\doxysubsection{dgr-\/route-\/manager-\/impl.cc}
\hypertarget{dgr-route-manager-impl_8cc_source}{}\label{dgr-route-manager-impl_8cc_source}\index{model/dgr-\/route-\/manager-\/impl.cc@{model/dgr-\/route-\/manager-\/impl.cc}}
\mbox{\hyperlink{dgr-route-manager-impl_8cc}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00001}00001\ \textcolor{comment}{/*\ -\/*-\/\ Mode:C++;\ c-\/file-\/style:"{}gnu"{};\ indent-\/tabs-\/mode:nil;\ -\/*-\/\ */}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00002}00002\ \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00003}00003\ \textcolor{comment}{\ *\ Copyright\ 2007\ University\ of\ Washington}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00004}00004\ \textcolor{comment}{\ *\ Copyright\ (C)\ 1999,\ 2000\ Kunihiro\ Ishiguro,\ Toshiaki\ Takada}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00005}00005\ \textcolor{comment}{\ *\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00006}00006\ \textcolor{comment}{\ *\ This\ program\ is\ free\ software;\ you\ can\ redistribute\ it\ and/or\ modify}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00007}00007\ \textcolor{comment}{\ *\ it\ under\ the\ terms\ of\ the\ GNU\ General\ Public\ License\ version\ 2\ as}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00008}00008\ \textcolor{comment}{\ *\ published\ by\ the\ Free\ Software\ Foundation;}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00009}00009\ \textcolor{comment}{\ *}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00010}00010\ \textcolor{comment}{\ *\ This\ program\ is\ distributed\ in\ the\ hope\ that\ it\ will\ be\ useful,}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00011}00011\ \textcolor{comment}{\ *\ but\ WITHOUT\ ANY\ WARRANTY;\ without\ even\ the\ implied\ warranty\ of}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00012}00012\ \textcolor{comment}{\ *\ MERCHANTABILITY\ or\ FITNESS\ FOR\ A\ PARTICULAR\ PURPOSE.\ \ See\ the}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00013}00013\ \textcolor{comment}{\ *\ GNU\ General\ Public\ License\ for\ more\ details.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00014}00014\ \textcolor{comment}{\ *}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00015}00015\ \textcolor{comment}{\ *\ You\ should\ have\ received\ a\ copy\ of\ the\ GNU\ General\ Public\ License}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00016}00016\ \textcolor{comment}{\ *\ along\ with\ this\ program;\ if\ not,\ write\ to\ the\ Free\ Software}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00017}00017\ \textcolor{comment}{\ *\ Foundation,\ Inc.,\ 59\ Temple\ Place,\ Suite\ 330,\ Boston,\ MA\ \ 02111-\/1307\ \ USA}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00018}00018\ \textcolor{comment}{\ *}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00019}00019\ \textcolor{comment}{\ *\ Authors:\ \ Tom\ Henderson\ (tomhend@u.washington.edu)}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00020}00020\ \textcolor{comment}{\ *\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00021}00021\ \textcolor{comment}{\ *\ Kunihiro\ Ishigura,\ Toshiaki\ Takada\ (GNU\ Zebra)\ are\ attributed\ authors}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00022}00022\ \textcolor{comment}{\ *\ of\ the\ quagga\ 0.99.7/src/ospfd/ospf\_spf.c\ code\ which\ was\ ported\ here}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00023}00023\ \textcolor{comment}{\ */}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00024}00024\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00025}00025\ \textcolor{preprocessor}{\#include\ <utility>}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00026}00026\ \textcolor{preprocessor}{\#include\ <vector>}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00027}00027\ \textcolor{preprocessor}{\#include\ <queue>}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00028}00028\ \textcolor{preprocessor}{\#include\ <algorithm>}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00029}00029\ \textcolor{preprocessor}{\#include\ <iostream>}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00030}00030\ \textcolor{preprocessor}{\#include\ "{}ns3/assert.h"{}}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00031}00031\ \textcolor{preprocessor}{\#include\ "{}ns3/fatal-\/error.h"{}}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00032}00032\ \textcolor{preprocessor}{\#include\ "{}ns3/log.h"{}}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00033}00033\ \textcolor{preprocessor}{\#include\ "{}ns3/node-\/list.h"{}}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00034}00034\ \textcolor{preprocessor}{\#include\ "{}ns3/ipv4.h"{}}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00035}00035\ \textcolor{preprocessor}{\#include\ "{}ns3/ipv4-\/routing-\/protocol.h"{}}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00036}00036\ \textcolor{preprocessor}{\#include\ "{}ns3/ipv4-\/list-\/routing.h"{}}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00037}00037\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{dgr-router-interface_8h}{dgr-\/router-\/interface.h}}"{}}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00038}00038\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{dgr-route-manager-impl_8h}{dgr-\/route-\/manager-\/impl.h}}"{}}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00039}00039\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{dgr-candidate-queue_8h}{dgr-\/candidate-\/queue.h}}"{}}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00040}00040\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{ipv4-dgr-routing_8h}{ipv4-\/dgr-\/routing.h}}"{}}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00041}00041\ \textcolor{preprocessor}{\#include\ <ctime>}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00042}00042\ \textcolor{preprocessor}{\#include\ <chrono>}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00043}00043\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00044}00044\ \textcolor{keyword}{namespace\ }\mbox{\hyperlink{namespacens3}{ns3}}\ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00045}00045\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00046}\mbox{\hyperlink{namespacens3_ad0cc4a88f3c35857b98e7a0bc0f4e69c}{00046}}\ \mbox{\hyperlink{namespacens3_adde9ed23eff577cdfec10d85035e32eb}{NS\_LOG\_COMPONENT\_DEFINE}}\ (\textcolor{stringliteral}{"{}DGRRouteManagerImpl"{}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00047}00047\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00055}\mbox{\hyperlink{namespacens3_a0a9ae979538d3faa7ad474ef7fa9d2bf}{00055}}\ std::ostream\&\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00056}00056\ \mbox{\hyperlink{namespacens3_a7c0f3fcc4f4363c5458911cded1af4b6}{operator<<\ }}(std::ostream\&\ os,\ \textcolor{keyword}{const}\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_aace20b0a545f431fbc5e3d6a2c149d44}{DGRVertex::NodeExit\_t}}\&\ exit)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00057}00057\ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00058}00058\ \ \ os\ <<\ \textcolor{stringliteral}{"{}("{}}\ <<\ exit.first\ <<\ \textcolor{stringliteral}{"{}\ ,"{}}\ <<\ exit.second\ <<\ \textcolor{stringliteral}{"{})"{}};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00059}00059\ \ \ \textcolor{keywordflow}{return}\ os;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00060}00060\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00061}00061\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00062}\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_af3ae1cd4e8023f9cf058b8c291748f38}{00062}}\ std::ostream\&\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00063}00063\ \mbox{\hyperlink{namespacens3_a7c0f3fcc4f4363c5458911cded1af4b6}{operator<<\ }}(std::ostream\&\ os,\ \textcolor{keyword}{const}\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_aa78a926a5b354a145d0164a164057a53}{DGRVertex::ListOfDGRVertex\_t}}\&\ vs)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00064}00064\ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00065}00065\ \ \ \textcolor{keyword}{typedef}\ DGRVertex::ListOfDGRVertex\_t::const\_iterator\ CIter\_t;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00066}00066\ \ \ os\ <<\ \textcolor{stringliteral}{"{}\{"{}};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00067}00067\ \ \ \textcolor{keywordflow}{for}\ (CIter\_t\ iter\ =\ vs.begin\ ();\ iter\ !=\ vs.end\ ();)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00068}00068\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00069}00069\ \ \ \ \ \ \ os\ <<\ (*iter)-\/>m\_vertexId;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00070}00070\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (++iter\ !=\ vs.end\ ())\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00071}00071\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00072}00072\ \ \ \ \ \ \ \ \ \ \ os\ <<\ \textcolor{stringliteral}{"{},\ "{}};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00073}00073\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00074}00074\ \ \ \ \ \ \ \textcolor{keywordflow}{else}\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00075}00075\ \ \ \ \ \ \ \ \ \{\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00076}00076\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00077}00077\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00078}00078\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00079}00079\ \ \ os\ <<\ \textcolor{stringliteral}{"{}\}"{}};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00080}00080\ \ \ \textcolor{keywordflow}{return}\ os;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00081}00081\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00082}00082\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00083}00083\ \textcolor{comment}{//\ -\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00084}00084\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00085}00085\ \textcolor{comment}{//\ DGRVertex\ Implementation}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00086}00086\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00087}00087\ \textcolor{comment}{//\ -\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00088}00088\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00089}\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_acf173c7ca9af5a3b19a0ec90c00a0253}{00089}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_acf173c7ca9af5a3b19a0ec90c00a0253}{DGRVertex::DGRVertex}}\ ()\ :\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00090}00090\ \ \ m\_vertexType\ (VertexUnknown),\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00091}00091\ \ \ m\_vertexId\ (\textcolor{stringliteral}{"{}255.255.255.255"{}}),\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00092}00092\ \ \ m\_lsa\ (0),}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00093}00093\ \ \ m\_distanceFromRoot\ (\mbox{\hyperlink{namespacens3_aa8c7346d1a02c40c94ad465301e57ef8}{DISTINFINITY}}),\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00094}00094\ \ \ m\_rootOif\ (\mbox{\hyperlink{namespacens3_aa8c7346d1a02c40c94ad465301e57ef8}{DISTINFINITY}}),}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00095}00095\ \ \ m\_nextHop\ (\textcolor{stringliteral}{"{}0.0.0.0"{}}),}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00096}00096\ \ \ m\_parents\ (),}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00097}00097\ \ \ m\_children\ (),}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00098}00098\ \ \ m\_vertexProcessed\ (false)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00099}00099\ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00100}00100\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00101}00101\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00102}00102\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00103}\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_aae74c2feb5e7323b1902202f10f93c03}{00103}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_acf173c7ca9af5a3b19a0ec90c00a0253}{DGRVertex::DGRVertex}}\ (\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a}{DGRRoutingLSA}}*\ lsa)\ :\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00104}00104\ \ \ m\_vertexId\ (lsa-\/>GetLinkStateId\ ()),}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00105}00105\ \ \ m\_lsa\ (lsa),}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00106}00106\ \ \ m\_distanceFromRoot\ (\mbox{\hyperlink{namespacens3_aa8c7346d1a02c40c94ad465301e57ef8}{DISTINFINITY}}),\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00107}00107\ \ \ m\_rootOif\ (\mbox{\hyperlink{namespacens3_aa8c7346d1a02c40c94ad465301e57ef8}{DISTINFINITY}}),}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00108}00108\ \ \ m\_nextHop\ (\textcolor{stringliteral}{"{}0.0.0.0"{}}),}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00109}00109\ \ \ m\_parents\ (),}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00110}00110\ \ \ m\_children\ (),}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00111}00111\ \ \ m\_vertexProcessed\ (false)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00112}00112\ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00113}00113\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ lsa);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00114}00114\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00115}00115\ \ \ \textcolor{keywordflow}{if}\ (lsa-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_aa00b07a4d8639539e94817f98905ef19}{GetLSType}}\ ()\ ==\ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a38d676a01a677ff003f198d454cf0694a0322ce07c2b94cdb14163bbe04cb9674}{DGRRoutingLSA::RouterLSA}})\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00116}00116\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00117}00117\ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Setting\ m\_vertexType\ to\ VertexRouter"{}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00118}00118\ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a378091a34909a44b8fae1e25d6f8e8e1}{m\_vertexType}}\ =\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a4e2ae872c20a6e44e2c53087a4e96ccea0d137433dfa77b24862a5f2c116da286}{DGRVertex::VertexRouter}};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00119}00119\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00120}00120\ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (lsa-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_aa00b07a4d8639539e94817f98905ef19}{GetLSType}}\ ()\ ==\ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a38d676a01a677ff003f198d454cf0694a5d51f5653b9ddf1d8bf640932068cb85}{DGRRoutingLSA::NetworkLSA}})\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00121}00121\ \ \ \ \ \{\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00122}00122\ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Setting\ m\_vertexType\ to\ VertexNetwork"{}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00123}00123\ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a378091a34909a44b8fae1e25d6f8e8e1}{m\_vertexType}}\ =\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a4e2ae872c20a6e44e2c53087a4e96ccea4cb6ddc9d2395166b87840984bc01880}{DGRVertex::VertexNetwork}};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00124}00124\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00125}00125\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00126}00126\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00127}\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_aab7d474354c078ab96afd48ec1ed5fa6}{00127}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_aab7d474354c078ab96afd48ec1ed5fa6}{DGRVertex::\string~DGRVertex}}\ ()}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00128}00128\ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00129}00129\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00130}00130\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00131}00131\ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Children\ vertices\ -\/\ "{}}\ <<\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a00201704c3afe974f06e06d5611c863b}{m\_children}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00132}00132\ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Parent\ verteices\ -\/\ "{}}\ <<\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_ad50ca09919dbd3f7b07252d0028623c2}{m\_parents}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00133}00133\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00134}00134\ \ \ \textcolor{comment}{//\ find\ this\ node\ from\ all\ its\ parents\ and\ remove\ the\ entry\ of\ this\ node}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00135}00135\ \ \ \textcolor{comment}{//\ from\ all\ its\ parents}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00136}00136\ \ \ \textcolor{keywordflow}{for}\ (ListOfDGRVertex\_t::iterator\ piter\ =\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_ad50ca09919dbd3f7b07252d0028623c2}{m\_parents}}.begin\ ();\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00137}00137\ \ \ \ \ \ \ \ piter\ !=\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_ad50ca09919dbd3f7b07252d0028623c2}{m\_parents}}.end\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00138}00138\ \ \ \ \ \ \ \ piter++)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00139}00139\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00140}00140\ \ \ \ \ \ \ \textcolor{comment}{//\ remove\ the\ current\ vertex\ from\ its\ parent's\ children\ list.\ Check}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00141}00141\ \ \ \ \ \ \ \textcolor{comment}{//\ if\ the\ size\ of\ the\ list\ is\ reduced,\ or\ the\ child<-\/>parent\ relation}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00142}00142\ \ \ \ \ \ \ \textcolor{comment}{//\ is\ not\ bidirectional}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00143}00143\ \ \ \ \ \ \ uint32\_t\ orgCount\ =\ (*piter)-\/>m\_children.size\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00144}00144\ \ \ \ \ \ \ (*piter)-\/>m\_children.remove\ (\textcolor{keyword}{this});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00145}00145\ \ \ \ \ \ \ uint32\_t\ newCount\ =\ (*piter)-\/>m\_children.size\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00146}00146\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (orgCount\ >\ newCount)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00147}00147\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00148}00148\ \ \ \ \ \ \ \ \ \ \ NS\_ASSERT\_MSG\ (orgCount\ >\ newCount,\ \textcolor{stringliteral}{"{}Unable\ to\ find\ the\ current\ vertex\ from\ its\ parents\ -\/-\/-\/\ impossible!"{}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00149}00149\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00150}00150\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00151}00151\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00152}00152\ \ \ \textcolor{comment}{//\ delete\ children}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00153}00153\ \ \ \textcolor{keywordflow}{while}\ (\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a00201704c3afe974f06e06d5611c863b}{m\_children}}.size\ ()\ >\ 0)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00154}00154\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00155}00155\ \ \ \ \ \ \ \textcolor{comment}{//\ pop\ out\ children\ one\ by\ one.\ Some\ children\ may\ disappear\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00156}00156\ \ \ \ \ \ \ \textcolor{comment}{//\ when\ deleting\ some\ other\ children\ in\ the\ list.\ As\ a\ result,}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00157}00157\ \ \ \ \ \ \ \textcolor{comment}{//\ it\ is\ necessary\ to\ use\ pop\ to\ walk\ through\ all\ children,\ instead}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00158}00158\ \ \ \ \ \ \ \textcolor{comment}{//\ of\ using\ iterator.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00159}00159\ \ \ \ \ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00160}00160\ \ \ \ \ \ \ \textcolor{comment}{//\ Note\ that\ m\_children.pop\_front\ ()\ is\ not\ necessary\ as\ this}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00161}00161\ \ \ \ \ \ \ \textcolor{comment}{//\ p\ is\ removed\ from\ the\ children\ list\ when\ p\ is\ deleted}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00162}00162\ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex}{DGRVertex}}*\ p\ =\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a00201704c3afe974f06e06d5611c863b}{m\_children}}.front\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00163}00163\ \ \ \ \ \ \ \textcolor{comment}{//\ 'p'\ ==\ 0,\ this\ child\ is\ already\ deleted\ by\ its\ other\ parent}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00164}00164\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (p\ ==\ 0)\ \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00165}00165\ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Parent\ vertex-\/"{}}\ <<\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_af327951c82d95adf7bc570bae0ee6536}{m\_vertexId}}\ <<\ \textcolor{stringliteral}{"{}\ deleting\ its\ child\ vertex-\/"{}}\ <<\ p-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a83acd923d19102c507faadb2f4e68f56}{GetVertexId}}\ ());}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00166}00166\ \ \ \ \ \ \ \textcolor{keyword}{delete}\ p;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00167}00167\ \ \ \ \ \ \ p\ =\ 0;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00168}00168\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00169}00169\ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a00201704c3afe974f06e06d5611c863b}{m\_children}}.clear\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00170}00170\ \ \ \textcolor{comment}{//\ delete\ parents}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00171}00171\ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_ad50ca09919dbd3f7b07252d0028623c2}{m\_parents}}.clear\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00172}00172\ \ \ \textcolor{comment}{//\ delete\ root\ exit\ direction}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00173}00173\ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a2e1e0e41f8fbb8ed3972197642674d88}{m\_ecmpRootExits}}.clear\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00174}00174\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00175}00175\ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Vertex-\/"{}}\ <<\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_af327951c82d95adf7bc570bae0ee6536}{m\_vertexId}}\ <<\ \textcolor{stringliteral}{"{}\ completed\ deleted"{}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00176}00176\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00177}00177\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00178}00178\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00179}\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a7d8e5d27954333a239893ec0a30b6486}{00179}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a7d8e5d27954333a239893ec0a30b6486}{DGRVertex::SetVertexType}}\ (\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a4e2ae872c20a6e44e2c53087a4e96cce}{DGRVertex::VertexType}}\ type)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00180}00180\ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00181}00181\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ type);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00182}00182\ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a378091a34909a44b8fae1e25d6f8e8e1}{m\_vertexType}}\ =\ type;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00183}00183\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00184}00184\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00185}00185\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a4e2ae872c20a6e44e2c53087a4e96cce}{DGRVertex::VertexType}}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00186}\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a5999846daefbeb25a5265e80e3f3a078}{00186}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a5999846daefbeb25a5265e80e3f3a078}{DGRVertex::GetVertexType}}\ (\textcolor{keywordtype}{void})\textcolor{keyword}{\ const}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00187}00187\ \textcolor{keyword}{}\{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00188}00188\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00189}00189\ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a378091a34909a44b8fae1e25d6f8e8e1}{m\_vertexType}};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00190}00190\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00191}00191\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00192}00192\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00193}\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a9dbfca905e6a1a00be1d1e5fb0d65051}{00193}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a9dbfca905e6a1a00be1d1e5fb0d65051}{DGRVertex::SetVertexId}}\ (Ipv4Address\ \textcolor{keywordtype}{id})}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00194}00194\ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00195}00195\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ \textcolor{keywordtype}{id});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00196}00196\ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_af327951c82d95adf7bc570bae0ee6536}{m\_vertexId}}\ =\ id;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00197}00197\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00198}00198\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00199}00199\ Ipv4Address}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00200}\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a83acd923d19102c507faadb2f4e68f56}{00200}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a83acd923d19102c507faadb2f4e68f56}{DGRVertex::GetVertexId}}\ (\textcolor{keywordtype}{void})\textcolor{keyword}{\ const}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00201}00201\ \textcolor{keyword}{}\{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00202}00202\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00203}00203\ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_af327951c82d95adf7bc570bae0ee6536}{m\_vertexId}};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00204}00204\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00205}00205\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00206}00206\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00207}\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a2285ab6067cd3294e32134b1bc5651dd}{00207}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a2285ab6067cd3294e32134b1bc5651dd}{DGRVertex::SetLSA}}\ (\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a}{DGRRoutingLSA}}*\ lsa)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00208}00208\ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00209}00209\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ lsa);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00210}00210\ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_ac159aa73dc98d368d334b4d3c01c6eb8}{m\_lsa}}\ =\ lsa;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00211}00211\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00212}00212\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00213}00213\ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a}{DGRRoutingLSA}}*}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00214}\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a5f9422d4f1f9df2f301cbd578e29ae7b}{00214}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a5f9422d4f1f9df2f301cbd578e29ae7b}{DGRVertex::GetLSA}}\ (\textcolor{keywordtype}{void})\textcolor{keyword}{\ const}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00215}00215\ \textcolor{keyword}{}\{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00216}00216\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00217}00217\ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_ac159aa73dc98d368d334b4d3c01c6eb8}{m\_lsa}};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00218}00218\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00219}00219\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00220}00220\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00221}\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a4b5aa6f4683f8736530d15c60f2538a5}{00221}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a4b5aa6f4683f8736530d15c60f2538a5}{DGRVertex::SetDistanceFromRoot}}\ (uint32\_t\ distance)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00222}00222\ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00223}00223\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ distance);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00224}00224\ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a6c0dd738fc7761774349eb65f80ac63b}{m\_distanceFromRoot}}\ =\ distance;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00225}00225\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00226}00226\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00227}00227\ uint32\_t}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00228}\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a307ee8139d815f7f26b8cf01e6885b53}{00228}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a307ee8139d815f7f26b8cf01e6885b53}{DGRVertex::GetDistanceFromRoot}}\ (\textcolor{keywordtype}{void})\textcolor{keyword}{\ const}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00229}00229\ \textcolor{keyword}{}\{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00230}00230\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00231}00231\ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a6c0dd738fc7761774349eb65f80ac63b}{m\_distanceFromRoot}};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00232}00232\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00233}00233\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00234}00234\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00235}\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a8ce35999d67d3028792f043c1efdf075}{00235}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a8ce35999d67d3028792f043c1efdf075}{DGRVertex::SetParent}}\ (\mbox{\hyperlink{classns3_1_1_d_g_r_vertex}{DGRVertex}}*\ parent)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00236}00236\ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00237}00237\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ parent);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00238}00238\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00239}00239\ \ \ \textcolor{comment}{//\ always\ maintain\ only\ one\ parent\ when\ using\ setter/getter\ methods}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00240}00240\ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_ad50ca09919dbd3f7b07252d0028623c2}{m\_parents}}.clear\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00241}00241\ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_ad50ca09919dbd3f7b07252d0028623c2}{m\_parents}}.push\_back\ (parent);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00242}00242\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00243}00243\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00244}00244\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex}{DGRVertex}}*}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00245}\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a6937ca725aa1a7f5284d1b75a5dfb9f8}{00245}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a6937ca725aa1a7f5284d1b75a5dfb9f8}{DGRVertex::GetParent}}\ (uint32\_t\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}})\textcolor{keyword}{\ const}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00246}00246\ \textcolor{keyword}{}\{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00247}00247\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00248}00248\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00249}00249\ \ \ \textcolor{comment}{//\ If\ the\ index\ i\ is\ out-\/of-\/range,\ return\ 0\ and\ do\ nothing}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00250}00250\ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_ad50ca09919dbd3f7b07252d0028623c2}{m\_parents}}.size\ ()\ <=\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}})}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00251}00251\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00252}00252\ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Index\ to\ DGRVertex's\ parent\ is\ out-\/of-\/range."{}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00253}00253\ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ 0;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00254}00254\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00255}00255\ \ \ ListOfDGRVertex\_t::const\_iterator\ iter\ =\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_ad50ca09919dbd3f7b07252d0028623c2}{m\_parents}}.begin\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00256}00256\ \ \ \textcolor{keywordflow}{while}\ (\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}-\/-\/\ >\ 0)\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00257}00257\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00258}00258\ \ \ \ \ \ \ iter++;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00259}00259\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00260}00260\ \ \ \textcolor{keywordflow}{return}\ *iter;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00261}00261\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00262}00262\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00263}00263\ \textcolor{keywordtype}{void}\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00264}\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_aa8a039e85d0a64c8451a8ea69ddd3fc0}{00264}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_aa8a039e85d0a64c8451a8ea69ddd3fc0}{DGRVertex::MergeParent}}\ (\textcolor{keyword}{const}\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex}{DGRVertex}}*\ v)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00265}00265\ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00266}00266\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ v);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00267}00267\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00268}00268\ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Before\ merge,\ list\ of\ parents\ =\ "{}}\ <<\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_ad50ca09919dbd3f7b07252d0028623c2}{m\_parents}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00269}00269\ \ \ \textcolor{comment}{//\ combine\ the\ two\ lists\ first,\ and\ then\ remove\ any\ duplicated\ after}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00270}00270\ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_ad50ca09919dbd3f7b07252d0028623c2}{m\_parents}}.insert\ (\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_ad50ca09919dbd3f7b07252d0028623c2}{m\_parents}}.end\ (),\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00271}00271\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_ad50ca09919dbd3f7b07252d0028623c2}{m\_parents}}.begin\ (),\ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_ad50ca09919dbd3f7b07252d0028623c2}{m\_parents}}.end\ ());}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00272}00272\ \ \ \textcolor{comment}{//\ remove\ duplication}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00273}00273\ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_ad50ca09919dbd3f7b07252d0028623c2}{m\_parents}}.sort\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00274}00274\ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_ad50ca09919dbd3f7b07252d0028623c2}{m\_parents}}.unique\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00275}00275\ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}After\ merge,\ list\ of\ parents\ =\ "{}}\ <<\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_ad50ca09919dbd3f7b07252d0028623c2}{m\_parents}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00276}00276\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00277}00277\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00278}00278\ \textcolor{keywordtype}{void}\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00279}\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_ae9023c5885bfce6327e2f8f1f360e961}{00279}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_ae9023c5885bfce6327e2f8f1f360e961}{DGRVertex::SetRootExitDirection}}\ (Ipv4Address\ nextHop,\ int32\_t\ \textcolor{keywordtype}{id})}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00280}00280\ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00281}00281\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ nextHop\ <<\ \textcolor{keywordtype}{id});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00282}00282\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00283}00283\ \ \ \textcolor{comment}{//\ always\ maintain\ only\ one\ root's\ exit}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00284}00284\ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a2e1e0e41f8fbb8ed3972197642674d88}{m\_ecmpRootExits}}.clear\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00285}00285\ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a2e1e0e41f8fbb8ed3972197642674d88}{m\_ecmpRootExits}}.push\_back\ (\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_aace20b0a545f431fbc5e3d6a2c149d44}{NodeExit\_t}}\ (nextHop,\ \textcolor{keywordtype}{id}));}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00286}00286\ \ \ \textcolor{comment}{//\ update\ the\ following\ in\ order\ to\ be\ backward\ compatitable\ with}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00287}00287\ \ \ \textcolor{comment}{//\ GetNextHop\ and\ GetOutgoingInterface\ methods}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00288}00288\ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a21155cece0079523ede5b6a3e94d4d6c}{m\_nextHop}}\ =\ nextHop;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00289}00289\ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a1bd3092c87612d18910764ad9469975b}{m\_rootOif}}\ =\ id;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00290}00290\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00291}00291\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00292}00292\ \textcolor{keywordtype}{void}\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00293}\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a65c6e670181e6f0bc8d1fb7468b13041}{00293}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_ae9023c5885bfce6327e2f8f1f360e961}{DGRVertex::SetRootExitDirection}}\ (\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_aace20b0a545f431fbc5e3d6a2c149d44}{DGRVertex::NodeExit\_t}}\ exit)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00294}00294\ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00295}00295\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ exit);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00296}00296\ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_ae9023c5885bfce6327e2f8f1f360e961}{SetRootExitDirection}}\ (exit.first,\ exit.second);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00297}00297\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00298}00298\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00299}00299\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_aace20b0a545f431fbc5e3d6a2c149d44}{DGRVertex::NodeExit\_t}}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00300}\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a9e66f0b2ee7432156046e75672968138}{00300}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a01db4520491672c7d666377aeb95b390}{DGRVertex::GetRootExitDirection}}\ (uint32\_t\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}})\textcolor{keyword}{\ const}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00301}00301\ \textcolor{keyword}{}\{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00302}00302\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00303}00303\ \ \ \textcolor{keyword}{typedef}\ ListOfNodeExit\_t::const\_iterator\ CIter\_t;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00304}00304\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00305}00305\ \ \ NS\_ASSERT\_MSG\ (\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ <\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a2e1e0e41f8fbb8ed3972197642674d88}{m\_ecmpRootExits}}.size\ (),\ \textcolor{stringliteral}{"{}Index\ out-\/of-\/range\ when\ accessing\ DGRVertex::m\_ecmpRootExits!"{}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00306}00306\ \ \ CIter\_t\ iter\ =\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a2e1e0e41f8fbb8ed3972197642674d88}{m\_ecmpRootExits}}.begin\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00307}00307\ \ \ \textcolor{keywordflow}{while}\ (\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}-\/-\/\ >\ 0)\ \{\ iter++;\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00308}00308\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00309}00309\ \ \ \textcolor{keywordflow}{return}\ *iter;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00310}00310\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00311}00311\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00312}00312\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_aace20b0a545f431fbc5e3d6a2c149d44}{DGRVertex::NodeExit\_t}}\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00313}\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a01db4520491672c7d666377aeb95b390}{00313}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a01db4520491672c7d666377aeb95b390}{DGRVertex::GetRootExitDirection}}\ ()\textcolor{keyword}{\ const}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00314}00314\ \textcolor{keyword}{}\{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00315}00315\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00316}00316\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00317}00317\ \ \ NS\_ASSERT\_MSG\ (\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a2e1e0e41f8fbb8ed3972197642674d88}{m\_ecmpRootExits}}.size\ ()\ <=\ 1,\ \textcolor{stringliteral}{"{}Assumed\ there\ is\ at\ most\ one\ exit\ from\ the\ root\ to\ this\ vertex"{}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00318}00318\ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a01db4520491672c7d666377aeb95b390}{GetRootExitDirection}}\ (0);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00319}00319\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00320}00320\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00321}00321\ \textcolor{keywordtype}{void}\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00322}\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_abfd711c43e166fc59f65235af75c4c07}{00322}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_abfd711c43e166fc59f65235af75c4c07}{DGRVertex::MergeRootExitDirections}}\ (\textcolor{keyword}{const}\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex}{DGRVertex}}*\ vertex)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00323}00323\ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00324}00324\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ vertex);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00325}00325\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00326}00326\ \ \ \textcolor{comment}{//\ obtain\ the\ external\ list\ of\ exit\ directions}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00327}00327\ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00328}00328\ \ \ \textcolor{comment}{//\ Append\ the\ external\ list\ into\ 'this'\ and\ remove\ duplication\ afterward}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00329}00329\ \ \ \textcolor{keyword}{const}\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a329d5add3e0fd627f1e3eb536a49199e}{ListOfNodeExit\_t}}\&\ extList\ =\ vertex-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a2e1e0e41f8fbb8ed3972197642674d88}{m\_ecmpRootExits}};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00330}00330\ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a2e1e0e41f8fbb8ed3972197642674d88}{m\_ecmpRootExits}}.insert\ (\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a2e1e0e41f8fbb8ed3972197642674d88}{m\_ecmpRootExits}}.end\ (),\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00331}00331\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ extList.begin\ (),\ extList.end\ ());}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00332}00332\ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a2e1e0e41f8fbb8ed3972197642674d88}{m\_ecmpRootExits}}.sort\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00333}00333\ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a2e1e0e41f8fbb8ed3972197642674d88}{m\_ecmpRootExits}}.unique\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00334}00334\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00335}00335\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00336}00336\ \textcolor{keywordtype}{void}\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00337}\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_aacb7dfc43225f6d7eca87f103c40c526}{00337}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_aacb7dfc43225f6d7eca87f103c40c526}{DGRVertex::InheritAllRootExitDirections}}\ (\textcolor{keyword}{const}\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex}{DGRVertex}}*\ vertex)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00338}00338\ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00339}00339\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ vertex);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00340}00340\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00341}00341\ \ \ \textcolor{comment}{//\ discard\ all\ exit\ direction\ currently\ associated\ with\ this\ vertex,}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00342}00342\ \ \ \textcolor{comment}{//\ and\ copy\ all\ the\ exit\ directions\ from\ the\ given\ vertex}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00343}00343\ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a2e1e0e41f8fbb8ed3972197642674d88}{m\_ecmpRootExits}}.size\ ()\ >\ 0)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00344}00344\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00345}00345\ \ \ \ \ \ \ NS\_LOG\_WARN\ (\textcolor{stringliteral}{"{}x\ root\ exit\ directions\ in\ this\ vertex\ are\ going\ to\ be\ discarded"{}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00346}00346\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00347}00347\ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a2e1e0e41f8fbb8ed3972197642674d88}{m\_ecmpRootExits}}.clear\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00348}00348\ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a2e1e0e41f8fbb8ed3972197642674d88}{m\_ecmpRootExits}}.insert\ (\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a2e1e0e41f8fbb8ed3972197642674d88}{m\_ecmpRootExits}}.end\ (),\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00349}00349\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ vertex-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a2e1e0e41f8fbb8ed3972197642674d88}{m\_ecmpRootExits}}.begin\ (),\ vertex-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a2e1e0e41f8fbb8ed3972197642674d88}{m\_ecmpRootExits}}.end\ ());}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00350}00350\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00351}00351\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00352}00352\ uint32\_t\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00353}\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a691c41409919639a4aaea1443fa26ed5}{00353}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a691c41409919639a4aaea1443fa26ed5}{DGRVertex::GetNRootExitDirections}}\ ()\textcolor{keyword}{\ const}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00354}00354\ \textcolor{keyword}{}\{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00355}00355\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00356}00356\ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a2e1e0e41f8fbb8ed3972197642674d88}{m\_ecmpRootExits}}.size\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00357}00357\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00358}00358\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00359}00359\ uint32\_t\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00360}\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a504717b90b3fad088d133c2e71836eaf}{00360}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a504717b90b3fad088d133c2e71836eaf}{DGRVertex::GetNChildren}}\ (\textcolor{keywordtype}{void})\textcolor{keyword}{\ const}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00361}00361\ \textcolor{keyword}{}\{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00362}00362\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00363}00363\ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a00201704c3afe974f06e06d5611c863b}{m\_children}}.size\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00364}00364\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00365}00365\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00366}00366\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex}{DGRVertex}}*}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00367}\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_aea98bf4a660837344a4c802546249a21}{00367}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_aea98bf4a660837344a4c802546249a21}{DGRVertex::GetChild}}\ (uint32\_t\ n)\textcolor{keyword}{\ const}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00368}00368\ \textcolor{keyword}{}\{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00369}00369\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ n);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00370}00370\ \ \ uint32\_t\ j\ =\ 0;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00371}00371\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00372}00372\ \ \ \textcolor{keywordflow}{for}\ (\ ListOfDGRVertex\_t::const\_iterator\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ =\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a00201704c3afe974f06e06d5611c863b}{m\_children}}.begin\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00373}00373\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ !=\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a00201704c3afe974f06e06d5611c863b}{m\_children}}.end\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00374}00374\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}++,\ j++)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00375}00375\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00376}00376\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (j\ ==\ n)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00377}00377\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00378}00378\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ *\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00379}00379\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00380}00380\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00381}00381\ \ \ NS\_ASSERT\_MSG\ (\textcolor{keyword}{false},\ \textcolor{stringliteral}{"{}Index\ <n>\ out\ of\ range."{}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00382}00382\ \ \ \textcolor{keywordflow}{return}\ 0;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00383}00383\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00384}00384\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00385}00385\ uint32\_t}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00386}\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_af0c852bbf364e527e6f7b1c34105a06e}{00386}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_af0c852bbf364e527e6f7b1c34105a06e}{DGRVertex::AddChild}}\ (\mbox{\hyperlink{classns3_1_1_d_g_r_vertex}{DGRVertex}}*\ child)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00387}00387\ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00388}00388\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ child);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00389}00389\ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a00201704c3afe974f06e06d5611c863b}{m\_children}}.push\_back\ (child);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00390}00390\ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a00201704c3afe974f06e06d5611c863b}{m\_children}}.size\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00391}00391\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00392}00392\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00393}00393\ \textcolor{keywordtype}{void}\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00394}\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_aa1718a99ec16d3ebf25949e3edac9168}{00394}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_aa1718a99ec16d3ebf25949e3edac9168}{DGRVertex::SetVertexProcessed}}\ (\textcolor{keywordtype}{bool}\ value)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00395}00395\ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00396}00396\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ value);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00397}00397\ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_acccf543804229747db8e14bcde5cefbd}{m\_vertexProcessed}}\ =\ value;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00398}00398\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00399}00399\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00400}00400\ \textcolor{keywordtype}{bool}\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00401}\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a6afcdedc8616fc035f8c9736d5679cd4}{00401}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a6afcdedc8616fc035f8c9736d5679cd4}{DGRVertex::IsVertexProcessed}}\ (\textcolor{keywordtype}{void})\textcolor{keyword}{\ const}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00402}00402\ \textcolor{keyword}{}\{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00403}00403\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00404}00404\ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_acccf543804229747db8e14bcde5cefbd}{m\_vertexProcessed}};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00405}00405\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00406}00406\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00407}00407\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00408}\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_adedcbcf4b3fd8a7db8a086d5beefc1d2}{00408}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_adedcbcf4b3fd8a7db8a086d5beefc1d2}{DGRVertex::ClearVertexProcessed}}\ (\textcolor{keywordtype}{void})}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00409}00409\ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00410}00410\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00411}00411\ \ \ \textcolor{keywordflow}{for}\ (uint32\_t\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ =\ 0;\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ <\ this-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a504717b90b3fad088d133c2e71836eaf}{GetNChildren}}\ ();\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}++)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00412}00412\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00413}00413\ \ \ \ \ \ \ this-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_aea98bf4a660837344a4c802546249a21}{GetChild}}\ (\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}})-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_adedcbcf4b3fd8a7db8a086d5beefc1d2}{ClearVertexProcessed}}\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00414}00414\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00415}00415\ \ \ this-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_aa1718a99ec16d3ebf25949e3edac9168}{SetVertexProcessed}}\ (\textcolor{keyword}{false});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00416}00416\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00417}00417\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00418}00418\ \textcolor{comment}{//\ -\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00419}00419\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00420}00420\ \textcolor{comment}{//\ DGRRouteManagerLSDB\ Implementation}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00421}00421\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00422}00422\ \textcolor{comment}{//\ -\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00423}00423\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00424}\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_l_s_d_b_a44ed1e3d6976c509795b69ef3c5e1109}{00424}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_l_s_d_b_a44ed1e3d6976c509795b69ef3c5e1109}{DGRRouteManagerLSDB::DGRRouteManagerLSDB}}\ ()}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00425}00425\ \ \ :}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00426}00426\ \ \ \ \ m\_database\ (),}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00427}00427\ \ \ \ \ m\_extdatabase\ ()}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00428}00428\ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00429}00429\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00430}00430\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00431}00431\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00432}\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_l_s_d_b_a5e87f265311abd433c6816ffd5799b05}{00432}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_l_s_d_b_a5e87f265311abd433c6816ffd5799b05}{DGRRouteManagerLSDB::\string~DGRRouteManagerLSDB}}\ ()}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00433}00433\ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00434}00434\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00435}00435\ \ \ LSDBMap\_t::iterator\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00436}00436\ \ \ \textcolor{keywordflow}{for}\ (\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}=\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_l_s_d_b_a93d1000c04198cf2a7df2b93b54d0ff5}{m\_database}}.begin\ ();\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}!=\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_l_s_d_b_a93d1000c04198cf2a7df2b93b54d0ff5}{m\_database}}.end\ ();\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}++)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00437}00437\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00438}00438\ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}free\ LSA"{}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00439}00439\ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a}{DGRRoutingLSA}}*\ temp\ =\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}-\/>second;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00440}00440\ \ \ \ \ \ \ \textcolor{keyword}{delete}\ temp;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00441}00441\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00442}00442\ \ \ \textcolor{keywordflow}{for}\ (uint32\_t\ j\ =\ 0;\ j\ <\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_l_s_d_b_a9620420bf4e991b6cbbaeca0c71098e0}{m\_extdatabase}}.size\ ();\ j++)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00443}00443\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00444}00444\ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}free\ ASexternalLSA"{}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00445}00445\ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a}{DGRRoutingLSA}}*\ temp\ =\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_l_s_d_b_a9620420bf4e991b6cbbaeca0c71098e0}{m\_extdatabase}}.at\ (j);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00446}00446\ \ \ \ \ \ \ \textcolor{keyword}{delete}\ temp;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00447}00447\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00448}00448\ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}clear\ map"{}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00449}00449\ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_l_s_d_b_a93d1000c04198cf2a7df2b93b54d0ff5}{m\_database}}.clear\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00450}00450\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00451}00451\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00452}00452\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00453}\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_l_s_d_b_a4cc94fab7e7699bd3b73e3e1bd874875}{00453}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_l_s_d_b_a4cc94fab7e7699bd3b73e3e1bd874875}{DGRRouteManagerLSDB::Initialize}}\ ()}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00454}00454\ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00455}00455\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00456}00456\ \ \ LSDBMap\_t::iterator\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00457}00457\ \ \ \textcolor{keywordflow}{for}\ (\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}=\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_l_s_d_b_a93d1000c04198cf2a7df2b93b54d0ff5}{m\_database}}.begin\ ();\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}!=\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_l_s_d_b_a93d1000c04198cf2a7df2b93b54d0ff5}{m\_database}}.end\ ();\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}++)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00458}00458\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00459}00459\ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a}{DGRRoutingLSA}}*\ temp\ =\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}-\/>second;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00460}00460\ \ \ \ \ \ \ temp-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a497453d1271c0020968487ec8ead99c5}{SetStatus}}\ (\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a2d6cf227cde572e9c99d273a0e0fa5f7ac563232b34162339268c7804c93765ad}{DGRRoutingLSA::LSA\_SPF\_NOT\_EXPLORED}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00461}00461\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00462}00462\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00463}00463\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00464}00464\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00465}\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_l_s_d_b_aef58a243bb62466470166e11cb165b97}{00465}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_l_s_d_b_aef58a243bb62466470166e11cb165b97}{DGRRouteManagerLSDB::Insert}}\ (Ipv4Address\ addr,\ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a}{DGRRoutingLSA}}*\ lsa)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00466}00466\ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00467}00467\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ addr\ <<\ lsa);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00468}00468\ \ \ \textcolor{keywordflow}{if}\ (lsa-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_aa00b07a4d8639539e94817f98905ef19}{GetLSType}}\ ()\ ==\ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a38d676a01a677ff003f198d454cf0694aca69c3cdc30b0ddcb8dd1dd95f79065a}{DGRRoutingLSA::ASExternalLSAs}})\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00469}00469\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00470}00470\ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_l_s_d_b_a9620420bf4e991b6cbbaeca0c71098e0}{m\_extdatabase}}.push\_back\ (lsa);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00471}00471\ \ \ \ \ \}\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00472}00472\ \ \ \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00473}00473\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00474}00474\ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_l_s_d_b_a93d1000c04198cf2a7df2b93b54d0ff5}{m\_database}}.insert\ (\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_l_s_d_b_a549df0eab868504027879ddf77bda6dc}{LSDBPair\_t}}\ (addr,\ lsa));}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00475}00475\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00476}00476\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00477}00477\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00478}00478\ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a}{DGRRoutingLSA}}*}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00479}\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_l_s_d_b_a4eccf46bb836fc866adeb57b38d6a493}{00479}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_l_s_d_b_a4eccf46bb836fc866adeb57b38d6a493}{DGRRouteManagerLSDB::GetExtLSA}}\ (uint32\_t\ index)\textcolor{keyword}{\ const}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00480}00480\ \textcolor{keyword}{}\{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00481}00481\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ index);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00482}00482\ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_l_s_d_b_a9620420bf4e991b6cbbaeca0c71098e0}{m\_extdatabase}}.at\ (index);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00483}00483\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00484}00484\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00485}00485\ uint32\_t}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00486}\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_l_s_d_b_a5ceebeea8595e2788e490c2e56cc3405}{00486}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_l_s_d_b_a5ceebeea8595e2788e490c2e56cc3405}{DGRRouteManagerLSDB::GetNumExtLSAs}}\ ()\textcolor{keyword}{\ const}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00487}00487\ \textcolor{keyword}{}\{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00488}00488\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00489}00489\ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_l_s_d_b_a9620420bf4e991b6cbbaeca0c71098e0}{m\_extdatabase}}.size\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00490}00490\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00491}00491\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00492}00492\ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a}{DGRRoutingLSA}}*}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00493}\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_l_s_d_b_a232013c41890eb75496e0201fd0689d2}{00493}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_l_s_d_b_a232013c41890eb75496e0201fd0689d2}{DGRRouteManagerLSDB::GetLSA}}\ (Ipv4Address\ addr)\textcolor{keyword}{\ const}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00494}00494\ \textcolor{keyword}{}\{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00495}00495\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ addr);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00496}00496\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00497}00497\ \textcolor{comment}{//\ Look\ up\ an\ LSA\ by\ its\ address.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00498}00498\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00499}00499\ \ \ LSDBMap\_t::const\_iterator\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00500}00500\ \ \ \textcolor{keywordflow}{for}\ (\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}=\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_l_s_d_b_a93d1000c04198cf2a7df2b93b54d0ff5}{m\_database}}.begin\ ();\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}!=\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_l_s_d_b_a93d1000c04198cf2a7df2b93b54d0ff5}{m\_database}}.end\ ();\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}++)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00501}00501\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00502}00502\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}-\/>first\ ==\ addr)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00503}00503\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00504}00504\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}-\/>second;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00505}00505\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00506}00506\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00507}00507\ \ \ \textcolor{keywordflow}{return}\ 0;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00508}00508\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00509}00509\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00510}00510\ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a}{DGRRoutingLSA}}*}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00511}\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_l_s_d_b_ac6f9ca728688bae5adc4172dee708553}{00511}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_l_s_d_b_ac6f9ca728688bae5adc4172dee708553}{DGRRouteManagerLSDB::GetLSAByLinkData}}\ (Ipv4Address\ addr)\textcolor{keyword}{\ const}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00512}00512\ \textcolor{keyword}{}\{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00513}00513\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ addr);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00514}00514\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00515}00515\ \textcolor{comment}{//\ Look\ up\ an\ LSA\ by\ its\ address.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00516}00516\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00517}00517\ \ \ LSDBMap\_t::const\_iterator\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00518}00518\ \ \ \textcolor{keywordflow}{for}\ (\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}=\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_l_s_d_b_a93d1000c04198cf2a7df2b93b54d0ff5}{m\_database}}.begin\ ();\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}!=\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_l_s_d_b_a93d1000c04198cf2a7df2b93b54d0ff5}{m\_database}}.end\ ();\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}++)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00519}00519\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00520}00520\ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a}{DGRRoutingLSA}}*\ temp\ =\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}-\/>second;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00521}00521\ \textcolor{comment}{//\ Iterate\ among\ temp's\ Link\ Records}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00522}00522\ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (uint32\_t\ j\ =\ 0;\ j\ <\ temp-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a882a042d18bcbdea3bc1a3eb55dcfe58}{GetNLinkRecords}}\ ();\ j++)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00523}00523\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00524}00524\ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record}{DGRRoutingLinkRecord}}\ *lr\ =\ temp-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_acb5df9fec863df510911aa3e64d4aa04}{GetLinkRecord}}\ (j);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00525}00525\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\ lr-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_ab9148eaf7a9d088a397e66164c1f30b9}{GetLinkType}}\ ()\ ==\ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_a93b89b9f89407a39712186911ad12a4baa0b0a272a289d2f1fcafdfedcde669b7}{DGRRoutingLinkRecord::TransitNetwork}}\ \&\&}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00526}00526\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ lr-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_a97080a8409f77898f4485230be0be5e4}{GetLinkData}}\ ()\ ==\ addr)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00527}00527\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00528}00528\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ temp;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00529}00529\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00530}00530\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00531}00531\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00532}00532\ \ \ \textcolor{keywordflow}{return}\ 0;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00533}00533\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00534}00534\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00535}00535\ \textcolor{comment}{//\ -\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00536}00536\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00537}00537\ \textcolor{comment}{//\ DGRRouteManagerImpl\ Implementation}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00538}00538\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00539}00539\ \textcolor{comment}{//\ -\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00540}00540\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00541}\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a13039dc3ca88e01a6f543a3bb97a53e7}{00541}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a13039dc3ca88e01a6f543a3bb97a53e7}{DGRRouteManagerImpl::DGRRouteManagerImpl}}\ ()\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00542}00542\ \ \ :}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00543}00543\ \ \ \ \ m\_spfroot\ (0)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00544}00544\ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00545}00545\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00546}00546\ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a466e6a4182a792e33610a1a1e7a6b990}{m\_lsdb}}\ =\ \textcolor{keyword}{new}\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_l_s_d_b}{DGRRouteManagerLSDB}}\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00547}00547\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00548}00548\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00549}\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a9c43604c3d2a66a108fa96faf7505b9f}{00549}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a9c43604c3d2a66a108fa96faf7505b9f}{DGRRouteManagerImpl::\string~DGRRouteManagerImpl}}\ ()}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00550}00550\ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00551}00551\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00552}00552\ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a466e6a4182a792e33610a1a1e7a6b990}{m\_lsdb}})}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00553}00553\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00554}00554\ \ \ \ \ \ \ \textcolor{keyword}{delete}\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a466e6a4182a792e33610a1a1e7a6b990}{m\_lsdb}};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00555}00555\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00556}00556\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00557}00557\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00558}00558\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00559}\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a7a59fdbaae988b5c5f8ac71e4d650143}{00559}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a7a59fdbaae988b5c5f8ac71e4d650143}{DGRRouteManagerImpl::DebugUseLsdb}}\ (\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_l_s_d_b}{DGRRouteManagerLSDB}}*\ lsdb)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00560}00560\ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00561}00561\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ lsdb);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00562}00562\ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a466e6a4182a792e33610a1a1e7a6b990}{m\_lsdb}})}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00563}00563\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00564}00564\ \ \ \ \ \ \ \textcolor{keyword}{delete}\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a466e6a4182a792e33610a1a1e7a6b990}{m\_lsdb}};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00565}00565\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00566}00566\ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a466e6a4182a792e33610a1a1e7a6b990}{m\_lsdb}}\ =\ lsdb;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00567}00567\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00568}00568\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00569}00569\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00570}\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_acfff2ecbb8d0d59a980f3876f1603aea}{00570}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_acfff2ecbb8d0d59a980f3876f1603aea}{DGRRouteManagerImpl::DeleteDGRRoutes}}\ ()}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00571}00571\ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00572}00572\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00573}00573\ \ \ NodeList::Iterator\ listEnd\ =\ NodeList::End\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00574}00574\ \ \ \textcolor{keywordflow}{for}\ (NodeList::Iterator\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ =\ NodeList::Begin\ ();\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ !=\ listEnd;\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}++)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00575}00575\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00576}00576\ \ \ \ \ \ \ Ptr<Node>\ node\ =\ *\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00577}00577\ \ \ \ \ \ \ Ptr<DGRRouter>\ router\ =\ node-\/>GetObject<\mbox{\hyperlink{classns3_1_1_d_g_r_router}{DGRRouter}}>\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00578}00578\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!router)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00579}00579\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00580}00580\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00581}00581\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00582}00582\ \ \ \ \ \ \ Ptr<Ipv4DGRRouting>\ gr\ =\ router-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_router_a87f63cac54a25accafa7c849a9aa0dbc}{GetRoutingProtocol}}\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00583}00583\ \ \ \ \ \ \ uint32\_t\ j\ =\ 0;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00584}00584\ \ \ \ \ \ \ uint32\_t\ nRoutes\ =\ gr-\/>GetNRoutes\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00585}00585\ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Deleting\ "{}}\ <<\ gr-\/>GetNRoutes\ ()<<\ \textcolor{stringliteral}{"{}\ routes\ from\ node\ "{}}\ <<\ node-\/>GetId\ ());}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00586}00586\ \ \ \ \ \ \ \textcolor{comment}{//\ Each\ time\ we\ delete\ route\ 0,\ the\ route\ index\ shifts\ downward}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00587}00587\ \ \ \ \ \ \ \textcolor{comment}{//\ We\ can\ delete\ all\ routes\ if\ we\ delete\ the\ route\ numbered\ 0}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00588}00588\ \ \ \ \ \ \ \textcolor{comment}{//\ nRoutes\ times}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00589}00589\ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (j\ =\ 0;\ j\ <\ nRoutes;\ j++)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00590}00590\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00591}00591\ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Deleting\ global\ route\ "{}}\ <<\ j\ <<\ \textcolor{stringliteral}{"{}\ from\ node\ "{}}\ <<\ node-\/>GetId\ ());}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00592}00592\ \ \ \ \ \ \ \ \ \ \ gr-\/>RemoveRoute\ (0);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00593}00593\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00594}00594\ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Deleted\ "{}}\ <<\ j\ <<\ \textcolor{stringliteral}{"{}\ global\ routes\ from\ node\ "{}}<<\ node-\/>GetId\ ());}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00595}00595\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00596}00596\ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a466e6a4182a792e33610a1a1e7a6b990}{m\_lsdb}})}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00597}00597\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00598}00598\ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Deleting\ LSDB,\ creating\ new\ one"{}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00599}00599\ \ \ \ \ \ \ \textcolor{keyword}{delete}\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a466e6a4182a792e33610a1a1e7a6b990}{m\_lsdb}};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00600}00600\ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a466e6a4182a792e33610a1a1e7a6b990}{m\_lsdb}}\ =\ \textcolor{keyword}{new}\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_l_s_d_b}{DGRRouteManagerLSDB}}\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00601}00601\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00602}00602\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00603}00603\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00604}00604\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00605}00605\ \textcolor{comment}{//\ In\ order\ to\ build\ the\ routing\ database,\ we\ need\ to\ walk\ the\ list\ of\ nodes}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00606}00606\ \textcolor{comment}{//\ in\ the\ system\ and\ look\ for\ those\ that\ support\ the\ DGRRouter\ interface.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00607}00607\ \textcolor{comment}{//\ These\ routers\ will\ export\ a\ number\ of\ Link\ State\ Advertisements\ (LSAs)}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00608}00608\ \textcolor{comment}{//\ that\ describe\ the\ links\ and\ networks\ that\ are\ "{}adjacent"{}\ (i.e.,\ that\ are}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00609}00609\ \textcolor{comment}{//\ on\ the\ other\ side\ of\ a\ point-\/to-\/point\ link).\ \ We\ take\ these\ LSAs\ and\ put}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00610}00610\ \textcolor{comment}{//\ add\ them\ to\ the\ Link\ State\ DataBase\ (LSDB)\ from\ which\ the\ routes\ will\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00611}00611\ \textcolor{comment}{//\ ultimately\ be\ computed.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00612}00612\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00613}00613\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00614}\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a033d120271836b470fecfe120c6fdbc8}{00614}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a033d120271836b470fecfe120c6fdbc8}{DGRRouteManagerImpl::BuildDGRRoutingDatabase}}\ ()\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00615}00615\ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00616}00616\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00617}00617\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00618}00618\ \textcolor{comment}{//\ Walk\ the\ list\ of\ nodes\ looking\ for\ the\ DGRRouter\ Interface.\ \ Nodes\ with}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00619}00619\ \textcolor{comment}{//\ global\ router\ interfaces\ are,\ not\ too\ surprisingly,\ our\ routers.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00620}00620\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00621}00621\ \ \ NodeList::Iterator\ listEnd\ =\ NodeList::End\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00622}00622\ \ \ \textcolor{keywordflow}{for}\ (NodeList::Iterator\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ =\ NodeList::Begin\ ();\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ !=\ listEnd;\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}++)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00623}00623\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00624}00624\ \ \ \ \ \ \ Ptr<Node>\ node\ =\ *\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00625}00625\ \ \ \ \ \ \ Ptr<DGRRouter>\ rtr\ =\ node-\/>GetObject<\mbox{\hyperlink{classns3_1_1_d_g_r_router}{DGRRouter}}>\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00626}00626\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00627}00627\ \textcolor{comment}{//\ Ignore\ nodes\ that\ aren't\ participating\ in\ routing.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00628}00628\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00629}00629\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!rtr)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00630}00630\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00631}00631\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00632}00632\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00633}00633\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00634}00634\ \textcolor{comment}{//\ You\ must\ call\ DiscoverLSAs\ ()\ before\ trying\ to\ use\ any\ routing\ info\ or\ to}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00635}00635\ \textcolor{comment}{//\ update\ LSAs.\ \ DiscoverLSAs\ ()\ drives\ the\ process\ of\ discovering\ routes\ in}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00636}00636\ \textcolor{comment}{//\ the\ DGRRouter.\ \ Afterward,\ you\ may\ use\ GetNumLSAs\ (),\ which\ is\ a\ very}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00637}00637\ \textcolor{comment}{//\ computationally\ inexpensive\ call.\ \ If\ you\ call\ GetNumLSAs\ ()\ before\ calling\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00638}00638\ \textcolor{comment}{//\ DiscoverLSAs\ ()\ will\ get\ zero\ as\ the\ number\ since\ no\ routes\ have\ been\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00639}00639\ \textcolor{comment}{//\ found.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00640}00640\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00641}00641\ \ \ \ \ \ \ Ptr<Ipv4DGRRouting>\ grouting\ =\ rtr-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_router_a87f63cac54a25accafa7c849a9aa0dbc}{GetRoutingProtocol}}\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00642}00642\ \ \ \ \ \ \ uint32\_t\ numLSAs\ =\ rtr-\/>DiscoverLSAs\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00643}00643\ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Found\ "{}}\ <<\ numLSAs\ <<\ \textcolor{stringliteral}{"{}\ LSAs"{}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00644}00644\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00645}00645\ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (uint32\_t\ j\ =\ 0;\ j\ <\ numLSAs;\ ++j)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00646}00646\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00647}00647\ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a}{DGRRoutingLSA}}*\ lsa\ =\ \textcolor{keyword}{new}\ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a}{DGRRoutingLSA}}\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00648}00648\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00649}00649\ \textcolor{comment}{//\ This\ is\ the\ call\ to\ actually\ fetch\ a\ Link\ State\ Advertisement\ from\ the\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00650}00650\ \textcolor{comment}{//\ router.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00651}00651\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00652}00652\ \ \ \ \ \ \ \ \ \ \ rtr-\/>GetLSA\ (j,\ *lsa);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00653}00653\ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (*lsa);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00654}00654\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00655}00655\ \textcolor{comment}{//\ Write\ the\ newly\ discovered\ link\ state\ advertisement\ to\ the\ database.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00656}00656\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00657}00657\ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a466e6a4182a792e33610a1a1e7a6b990}{m\_lsdb}}-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_l_s_d_b_aef58a243bb62466470166e11cb165b97}{Insert}}\ (lsa-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a0ec746b926044a548e4f3a09309322ce}{GetLinkStateId}}\ (),\ lsa);\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00658}00658\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00659}00659\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00660}00660\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00661}00661\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00662}00662\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00663}00663\ \textcolor{comment}{//\ For\ each\ node\ that\ is\ a\ global\ router\ (which\ is\ determined\ by\ the\ presence}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00664}00664\ \textcolor{comment}{//\ of\ an\ aggregated\ DGRRouter\ interface),\ run\ the\ Dijkstra\ SPF\ calculation}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00665}00665\ \textcolor{comment}{//\ on\ the\ database\ rooted\ at\ that\ router,\ and\ populate\ the\ node\ forwarding}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00666}00666\ \textcolor{comment}{//\ tables.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00667}00667\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00668}00668\ \textcolor{comment}{//\ This\ function\ parallels\ RFC2328,\ Section\ 16.1.1,\ and\ quagga\ ospfd}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00669}00669\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00670}00670\ \textcolor{comment}{//\ This\ calculation\ yields\ the\ set\ of\ intra-\/area\ routes\ associated}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00671}00671\ \textcolor{comment}{//\ with\ an\ area\ (called\ hereafter\ Area\ A).\ \ A\ router\ calculates\ the}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00672}00672\ \textcolor{comment}{//\ shortest-\/path\ tree\ using\ itself\ as\ the\ root.\ \ The\ formation}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00673}00673\ \textcolor{comment}{//\ of\ the\ shortest\ path\ tree\ is\ done\ here\ in\ two\ stages.\ \ In\ the}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00674}00674\ \textcolor{comment}{//\ first\ stage,\ only\ links\ between\ routers\ and\ transit\ networks\ are}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00675}00675\ \textcolor{comment}{//\ considered.\ \ Using\ the\ Dijkstra\ algorithm,\ a\ tree\ is\ formed\ from}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00676}00676\ \textcolor{comment}{//\ this\ subset\ of\ the\ link\ state\ database.\ \ In\ the\ second\ stage,}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00677}00677\ \textcolor{comment}{//\ leaves\ are\ added\ to\ the\ tree\ by\ considering\ the\ links\ to\ stub}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00678}00678\ \textcolor{comment}{//\ networks.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00679}00679\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00680}00680\ \textcolor{comment}{//\ The\ area's\ link\ state\ database\ is\ represented\ as\ a\ directed\ graph.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00681}00681\ \textcolor{comment}{//\ The\ graph's\ vertices\ are\ routers,\ transit\ networks\ and\ stub\ networks.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00682}00682\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00683}00683\ \textcolor{comment}{//\ The\ first\ stage\ of\ the\ procedure\ (i.e.,\ the\ Dijkstra\ algorithm)}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00684}00684\ \textcolor{comment}{//\ can\ now\ be\ summarized\ as\ follows.\ At\ each\ iteration\ of\ the}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00685}00685\ \textcolor{comment}{//\ algorithm,\ there\ is\ a\ list\ of\ candidate\ vertices.\ \ Paths\ from}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00686}00686\ \textcolor{comment}{//\ the\ root\ to\ these\ vertices\ have\ been\ found,\ but\ not\ necessarily}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00687}00687\ \textcolor{comment}{//\ the\ shortest\ ones.\ \ However,\ the\ paths\ to\ the\ candidate\ vertex}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00688}00688\ \textcolor{comment}{//\ that\ is\ closest\ to\ the\ root\ are\ guaranteed\ to\ be\ shortest;\ this}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00689}00689\ \textcolor{comment}{//\ vertex\ is\ added\ to\ the\ shortest-\/path\ tree,\ removed\ from\ the}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00690}00690\ \textcolor{comment}{//\ candidate\ list,\ and\ its\ adjacent\ vertices\ are\ examined\ for}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00691}00691\ \textcolor{comment}{//\ possible\ addition\ to/modification\ of\ the\ candidate\ list.\ \ The}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00692}00692\ \textcolor{comment}{//\ algorithm\ then\ iterates\ again.\ \ It\ terminates\ when\ the\ candidate}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00693}00693\ \textcolor{comment}{//\ list\ becomes\ empty.\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00694}00694\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00695}00695\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00696}\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a3b798959aeda8a76373705151497692e}{00696}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a3b798959aeda8a76373705151497692e}{DGRRouteManagerImpl::InitializeRoutes}}\ ()}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00697}00697\ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00698}00698\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00699}00699\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00700}00700\ \textcolor{comment}{//\ Walk\ the\ list\ of\ nodes\ in\ the\ system.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00701}00701\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00702}00702\ \ \ \textcolor{keyword}{auto}\ begin\ =\ std::chrono::system\_clock::now\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00703}00703\ \ \ int64\_t\ begin\_microseconds\ =\ std::chrono::duration\_cast<std::chrono::microseconds>(begin.time\_since\_epoch\ ()).count\ ();\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00704}00704\ \ \ NS\_LOG\_INFO\ (\textcolor{stringliteral}{"{}About\ to\ start\ SPF\ calculation"{}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00705}00705\ \ \ NodeList::Iterator\ listEnd\ =\ NodeList::End\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00706}00706\ \ \ \textcolor{keywordflow}{for}\ (NodeList::Iterator\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ =\ NodeList::Begin\ ();\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ !=\ listEnd;\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}++)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00707}00707\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00708}00708\ \ \ \ \ \ \ Ptr<Node>\ node\ =\ *\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00709}00709\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00710}00710\ \ \ \ \ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00711}00711\ \ \ \ \ \ \ \textcolor{comment}{//\ Look\ for\ the\ DGRRouter\ interface\ that\ indicates\ that\ the\ node\ is}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00712}00712\ \ \ \ \ \ \ \textcolor{comment}{//\ participating\ in\ routing.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00713}00713\ \ \ \ \ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00714}00714\ \ \ \ \ \ \ Ptr<DGRRouter>\ rtr\ =\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00715}00715\ \ \ \ \ \ \ \ \ node-\/>GetObject<\mbox{\hyperlink{classns3_1_1_d_g_r_router}{DGRRouter}}>\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00716}00716\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00717}00717\ \ \ \ \ \ \ uint32\_t\ systemId\ =\ Simulator::GetSystemId\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00718}00718\ \ \ \ \ \ \ \textcolor{comment}{//\ Ignore\ nodes\ that\ are\ not\ assigned\ to\ our\ systemId\ (distributed\ sim)}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00719}00719\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (node-\/>GetSystemId\ ()\ !=\ systemId)\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00720}00720\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00721}00721\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00722}00722\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00723}00723\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00724}00724\ \ \ \ \ \ \ \textcolor{comment}{//\ -\/-\/-\/-\/-\/-\/-\/-\/-\/-\/\ Initialize\ Neighbor\ Information\ exchange\ -\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00725}00725\ \ \ \ \ \ \ Ptr<Ipv4DGRRouting>\ dgr\ =\ rtr-\/>GetRoutingProtocol\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00726}00726\ \ \ \ \ \ \ dgr-\/>DoInitialize\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00727}00727\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00728}00728\ \ \ \ \ \ \ \textcolor{comment}{//\ -\/-\/-\/-\/-\/-\/-\/-\/\ Initialize\ routing\ table\ -\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00729}00729\ \ \ \ \ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00730}00730\ \ \ \ \ \ \ \textcolor{comment}{//\ if\ the\ node\ has\ a\ DGR\ router\ interface,\ then\ run\ the\ DGR\ routing}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00731}00731\ \ \ \ \ \ \ \textcolor{comment}{//\ algorithms.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00732}00732\ \ \ \ \ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00733}00733\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex}{DGRVertex}}\ *v;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00734}00734\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a}{DGRRoutingLSA}}*\ w\_lsa\ =\ 0;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00735}00735\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record}{DGRRoutingLinkRecord}}\ *l\ =\ 0;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00736}00736\ \ \ \ \ \ \ \ \ uint32\_t\ numRecordsInVertex\ =\ 0;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00737}00737\ \ \ \ \ \ \ \ \ v\ =\ \textcolor{keyword}{new}\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex}{DGRVertex}}\ (\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a466e6a4182a792e33610a1a1e7a6b990}{m\_lsdb}}-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_l_s_d_b_a232013c41890eb75496e0201fd0689d2}{GetLSA}}(rtr-\/>GetRouterId\ ()));}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00738}00738\ \ \ \ \ \ \ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00739}00739\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ V\ points\ to\ a\ Router-\/LSA\ or\ Network-\/LSA}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00740}00740\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Loop\ over\ the\ links\ in\ router\ LSA\ or\ attached\ routers\ in\ Network\ LSA}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00741}00741\ \ \ \ \ \ \ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00742}00742\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a5999846daefbeb25a5265e80e3f3a078}{GetVertexType}}\ ()\ ==\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a4e2ae872c20a6e44e2c53087a4e96ccea0d137433dfa77b24862a5f2c116da286}{DGRVertex::VertexRouter}})}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00743}00743\ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00744}00744\ \ \ \ \ \ \ \ \ \ \ \ \ numRecordsInVertex\ =\ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a5f9422d4f1f9df2f301cbd578e29ae7b}{GetLSA}}\ ()-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a882a042d18bcbdea3bc1a3eb55dcfe58}{GetNLinkRecords}}\ ();\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00745}00745\ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00746}00746\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a5999846daefbeb25a5265e80e3f3a078}{GetVertexType}}\ ()\ ==\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a4e2ae872c20a6e44e2c53087a4e96ccea4cb6ddc9d2395166b87840984bc01880}{DGRVertex::VertexNetwork}})}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00747}00747\ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00748}00748\ \ \ \ \ \ \ \ \ \ \ \ \ numRecordsInVertex\ =\ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a5f9422d4f1f9df2f301cbd578e29ae7b}{GetLSA}}\ ()-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_ae7e796f5d4860d2236bef31d74364c91}{GetNAttachedRouters}}\ ();\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00749}00749\ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00750}00750\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (uint32\_t\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ =\ 0;\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ <\ numRecordsInVertex;\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}++)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00751}00751\ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00752}00752\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ std::cout\ <<\ "{}i\ =\ "{}\ <<\ i\ <<\ std::endl;}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00753}00753\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a5999846daefbeb25a5265e80e3f3a078}{GetVertexType}}\ ()\ ==\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a4e2ae872c20a6e44e2c53087a4e96ccea0d137433dfa77b24862a5f2c116da286}{DGRVertex::VertexRouter}})\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00754}00754\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00755}00755\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Examining\ link\ "{}}\ <<\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ <<\ \textcolor{stringliteral}{"{}\ of\ "{}}\ <<\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00756}00756\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a83acd923d19102c507faadb2f4e68f56}{GetVertexId}}\ ()\ <<\ \textcolor{stringliteral}{"{}'s\ "{}}\ <<}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00757}00757\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a5f9422d4f1f9df2f301cbd578e29ae7b}{GetLSA}}\ ()-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a882a042d18bcbdea3bc1a3eb55dcfe58}{GetNLinkRecords}}\ ()\ <<\ \textcolor{stringliteral}{"{}\ link\ records"{}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00758}00758\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00759}00759\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ (a)\ If\ this\ is\ a\ link\ to\ a\ stub\ network,\ examine\ the\ next\ link\ in\ V's\ LSA.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00760}00760\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Links\ to\ stub\ networks\ will\ be\ considered\ in\ the\ second\ stage\ of\ the}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00761}00761\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ shortest\ path\ calculation.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00762}00762\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00763}00763\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ l\ =\ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a5f9422d4f1f9df2f301cbd578e29ae7b}{GetLSA}}\ ()-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_acb5df9fec863df510911aa3e64d4aa04}{GetLinkRecord}}\ (\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00764}00764\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NS\_ASSERT\ (l\ !=\ 0);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00765}00765\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (l-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_ab9148eaf7a9d088a397e66164c1f30b9}{GetLinkType}}\ ()\ ==\ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_a93b89b9f89407a39712186911ad12a4ba31c95bb0542fb4fab6cb056f88eea561}{DGRRoutingLinkRecord::StubNetwork}})}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00766}00766\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00767}00767\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Found\ a\ Stub\ record\ to\ "{}}\ <<\ l-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_a9fe6e135674ef321bc11b48f90071857}{GetLinkId}}\ ());}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00768}00768\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00769}00769\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00770}00770\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00771}00771\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ (b)\ Otherwise,\ W\ is\ a\ transit\ vertex\ (router\ or\ transit\ network).\ \ Look\ up}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00772}00772\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ the\ vertex\ W's\ LSA\ (router-\/LSA\ or\ network-\/LSA)\ in\ Area\ A's\ link\ state}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00773}00773\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ database.\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00774}00774\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00775}00775\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (l-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_ab9148eaf7a9d088a397e66164c1f30b9}{GetLinkType}}\ ()\ ==\ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_a93b89b9f89407a39712186911ad12a4bac9c0a2d3da9eb9fdafee93e52a498c84}{DGRRoutingLinkRecord::PointToPoint}})}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00776}00776\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00777}00777\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00778}00778\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Lookup\ the\ link\ state\ advertisement\ of\ the\ new\ link\ -\/-\/\ we\ call\ it\ <w>\ in}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00779}00779\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ the\ link\ state\ database.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00780}00780\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00781}00781\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ w\_lsa\ =\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a466e6a4182a792e33610a1a1e7a6b990}{m\_lsdb}}-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_l_s_d_b_a232013c41890eb75496e0201fd0689d2}{GetLSA}}\ (l-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_a9fe6e135674ef321bc11b48f90071857}{GetLinkId}}\ ());}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00782}00782\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NS\_ASSERT\ (w\_lsa);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00783}00783\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Found\ a\ P2P\ record\ from\ "{}}\ <<\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00784}00784\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a83acd923d19102c507faadb2f4e68f56}{GetVertexId}}\ ()\ <<\ \textcolor{stringliteral}{"{}\ to\ "{}}\ <<\ w\_lsa-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a0ec746b926044a548e4f3a09309322ce}{GetLinkStateId}}\ ());}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00785}00785\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Ptr<DGRRouter>\ router\ =\ node-\/>GetObject<\mbox{\hyperlink{classns3_1_1_d_g_r_router}{DGRRouter}}>\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00786}00786\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!router)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00787}00787\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00788}00788\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00789}00789\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00790}00790\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Ptr<Ipv4DGRRouting>\ gr\ =\ router-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_router_a87f63cac54a25accafa7c849a9aa0dbc}{GetRoutingProtocol}}\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00791}00791\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NS\_ASSERT\ (gr);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00792}00792\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record}{DGRRoutingLinkRecord}}\ *linkRemote\ =0;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00793}00793\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex}{DGRVertex}}*\ w\ =\ \textcolor{keyword}{new}\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex}{DGRVertex}}\ (w\_lsa);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00794}00794\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ linkRemote\ =\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a1ac857e005409b302b1bd2fb1180af0a}{SPFGetNextLink}}\ (w,\ v,\ linkRemote);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00795}00795\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Ptr<Ipv4>\ ipv4\ =\ node-\/>GetObject<Ipv4>\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00796}00796\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ int32\_t\ Iface\ =\ ipv4-\/>GetInterfaceForAddress\ (l-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_a97080a8409f77898f4485230be0be5e4}{GetLinkData}}\ ());}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00797}00797\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ std::cout\ <<\ "{}The\ interface\ =\ "{}\ <<\ Iface\ <<\ std::endl;}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00798}00798\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ gr-\/>AddHostRouteTo\ (linkRemote-\/>GetLinkData\ (),\ linkRemote-\/>GetLinkData\ (),\ Iface,\ l-\/>GetMetric\ ());}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00799}00799\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00800}00800\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ todo}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00801}00801\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (NodeList::Iterator\ j\ =\ NodeList::Begin\ ();\ j\ !=\ listEnd;\ j++)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00802}00802\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00803}00803\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Ptr<Node>\ nextNode\ =\ *j;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00804}00804\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Ptr<Ipv4>\ nextIpv4\ =\ nextNode-\/>GetObject<Ipv4>\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00805}00805\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (uint32\_t\ iter\ =0;\ iter\ <\ nextIpv4-\/>GetNInterfaces\ ();\ iter\ ++)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00806}00806\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00807}00807\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Ipv4InterfaceAddress\ ifc\ =\ nextIpv4-\/>GetAddress\ (iter,0);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00808}00808\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Ipv4Address\ addr\ =\ ifc.GetLocal\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00809}00809\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (addr\ ==\ linkRemote-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_a97080a8409f77898f4485230be0be5e4}{GetLinkData}}\ ())}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00810}00810\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00811}00811\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (uint32\_t\ nIfc\ =\ 1;\ nIfc\ <\ nextIpv4-\/>GetNInterfaces\ ();\ nIfc\ ++)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00812}00812\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00813}00813\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ gr-\/>AddHostRouteTo\ (nextIpv4-\/>GetAddress\ (nIfc,0).GetLocal\ (),\ linkRemote-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_a97080a8409f77898f4485230be0be5e4}{GetLinkData}}\ (),\ Iface,\ -\/1,\ l-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_af96cb9a05b3d95d14b6af29e058e3712}{GetMetric}}\ ());}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00814}00814\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00815}00815\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00816}00816\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00817}00817\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\ \ \ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00818}00818\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00819}00819\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00820}00820\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a910c2efcc40a79d4c062eb08ceb11522}{SPFCalculate}}\ (w\_lsa-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a0ec746b926044a548e4f3a09309322ce}{GetLinkStateId}}\ (),\ rtr-\/>GetRouterId\ (),\ linkRemote,\ Iface);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00821}00821\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00822}00822\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (l-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_ab9148eaf7a9d088a397e66164c1f30b9}{GetLinkType}}\ ()\ ==\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00823}00823\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_a93b89b9f89407a39712186911ad12a4baa0b0a272a289d2f1fcafdfedcde669b7}{DGRRoutingLinkRecord::TransitNetwork}})}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00824}00824\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00825}00825\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ w\_lsa\ =\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a466e6a4182a792e33610a1a1e7a6b990}{m\_lsdb}}-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_l_s_d_b_a232013c41890eb75496e0201fd0689d2}{GetLSA}}\ (l-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_a9fe6e135674ef321bc11b48f90071857}{GetLinkId}}\ ());}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00826}00826\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NS\_ASSERT\ (w\_lsa);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00827}00827\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Found\ a\ Transit\ record\ from\ "{}}\ <<\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00828}00828\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a83acd923d19102c507faadb2f4e68f56}{GetVertexId}}\ ()\ <<\ \textcolor{stringliteral}{"{}\ to\ "{}}\ <<\ w\_lsa-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a0ec746b926044a548e4f3a09309322ce}{GetLinkStateId}}\ ());}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00829}00829\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a910c2efcc40a79d4c062eb08ceb11522}{SPFCalculate}}\ (w\_lsa-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a0ec746b926044a548e4f3a09309322ce}{GetLinkStateId}}\ (),\ rtr-\/>GetRouterId\ (),\ l,\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}+1);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00830}00830\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00831}00831\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00832}00832\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00833}00833\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NS\_ASSERT\_MSG\ (0,\ \textcolor{stringliteral}{"{}illegal\ Link\ Type"{}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00834}00834\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00835}00835\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00836}00836\ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00837}00837\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00838}00838\ \ \ \textcolor{keyword}{auto}\ end\ =\ std::chrono::system\_clock::now\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00839}00839\ \ \ int64\_t\ end\_microseconds\ =\ std::chrono::duration\_cast<std::chrono::microseconds>(end.time\_since\_epoch\ ()).count\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00840}00840\ \ \ int64\_t\ durTime\ =\ end\_microseconds\ -\/\ begin\_microseconds;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00841}00841\ \ \ std::ofstream\ write;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00842}00842\ \ \ write.open\ (\textcolor{stringliteral}{"{}/home/ff/Desktop/infcomm2023/dgr/ns-\/allinone-\/3.33/ns-\/3.33/contrib/dgr/infocomm2023/new\_1\_runtime/result/dgr.txt"{}},\ std::ios::app);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00843}00843\ \ \ write\ <<\ durTime\ <<\ std::endl;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00844}00844\ \ \ NS\_LOG\_INFO\ (\textcolor{stringliteral}{"{}Finished\ DGR-\/SPF\ calculation"{}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00845}00845\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00846}00846\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00847}00847\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00848}00848\ \textcolor{comment}{//\ This\ method\ is\ derived\ from\ quagga\ ospf\_spf\_next\ ().\ \ See\ RFC2328\ Section\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00849}00849\ \textcolor{comment}{//\ 16.1\ (2)\ for\ further\ details.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00850}00850\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00851}00851\ \textcolor{comment}{//\ We're\ passed\ a\ parameter\ <v>\ that\ is\ a\ vertex\ which\ is\ already\ in\ the\ SPF}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00852}00852\ \textcolor{comment}{//\ tree.\ \ A\ vertex\ represents\ a\ router\ node.\ \ We\ also\ get\ a\ reference\ to\ the}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00853}00853\ \textcolor{comment}{//\ SPF\ candidate\ queue,\ which\ is\ a\ priority\ queue\ containing\ the\ shortest\ paths}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00854}00854\ \textcolor{comment}{//\ to\ the\ networks\ we\ know\ about.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00855}00855\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00856}00856\ \textcolor{comment}{//\ We\ examine\ the\ links\ in\ v's\ LSA\ and\ update\ the\ list\ of\ candidates\ with\ any}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00857}00857\ \textcolor{comment}{//\ vertices\ not\ already\ on\ the\ list.\ \ If\ a\ lower-\/cost\ path\ is\ found\ to\ a}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00858}00858\ \textcolor{comment}{//\ vertex\ already\ on\ the\ candidate\ list,\ store\ the\ new\ (lower)\ cost.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00859}00859\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00860}00860\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00861}\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_ab573904f9f357e2b802b1bbdcdc3247d}{00861}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_ab573904f9f357e2b802b1bbdcdc3247d}{DGRRouteManagerImpl::SPFNext}}\ (\mbox{\hyperlink{classns3_1_1_d_g_r_vertex}{DGRVertex}}*\ v,\ \mbox{\hyperlink{classns3_1_1_d_g_r_candidate_queue}{DGRCandidateQueue}}\&\ candidate)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00862}00862\ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00863}00863\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ v\ <<\ \&candidate);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00864}00864\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00865}00865\ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex}{DGRVertex}}*\ w\ =\ 0;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00866}00866\ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a}{DGRRoutingLSA}}*\ w\_lsa\ =\ 0;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00867}00867\ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record}{DGRRoutingLinkRecord}}\ *l\ =\ 0;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00868}00868\ \ \ uint32\_t\ distance\ =\ 0;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00869}00869\ \ \ uint32\_t\ numRecordsInVertex\ =\ 0;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00870}00870\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00871}00871\ \textcolor{comment}{//\ V\ points\ to\ a\ Router-\/LSA\ or\ Network-\/LSA}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00872}00872\ \textcolor{comment}{//\ Loop\ over\ the\ links\ in\ router\ LSA\ or\ attached\ routers\ in\ Network\ LSA}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00873}00873\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00874}00874\ \ \ \textcolor{keywordflow}{if}\ (v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a5999846daefbeb25a5265e80e3f3a078}{GetVertexType}}\ ()\ ==\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a4e2ae872c20a6e44e2c53087a4e96ccea0d137433dfa77b24862a5f2c116da286}{DGRVertex::VertexRouter}})}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00875}00875\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00876}00876\ \ \ \ \ \ \ numRecordsInVertex\ =\ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a5f9422d4f1f9df2f301cbd578e29ae7b}{GetLSA}}\ ()-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a882a042d18bcbdea3bc1a3eb55dcfe58}{GetNLinkRecords}}\ ();\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00877}00877\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00878}00878\ \ \ \textcolor{keywordflow}{if}\ (v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a5999846daefbeb25a5265e80e3f3a078}{GetVertexType}}\ ()\ ==\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a4e2ae872c20a6e44e2c53087a4e96ccea4cb6ddc9d2395166b87840984bc01880}{DGRVertex::VertexNetwork}})}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00879}00879\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00880}00880\ \ \ \ \ \ \ numRecordsInVertex\ =\ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a5f9422d4f1f9df2f301cbd578e29ae7b}{GetLSA}}\ ()-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_ae7e796f5d4860d2236bef31d74364c91}{GetNAttachedRouters}}\ ();\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00881}00881\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00882}00882\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00883}00883\ \ \ \textcolor{keywordflow}{for}\ (uint32\_t\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ =\ 0;\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ <\ numRecordsInVertex;\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}++)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00884}00884\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00885}00885\ \textcolor{comment}{//\ Get\ w\_lsa:\ \ In\ case\ of\ V\ is\ Router-\/LSA}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00886}00886\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a5999846daefbeb25a5265e80e3f3a078}{GetVertexType}}\ ()\ ==\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a4e2ae872c20a6e44e2c53087a4e96ccea0d137433dfa77b24862a5f2c116da286}{DGRVertex::VertexRouter}})\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00887}00887\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00888}00888\ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Examining\ link\ "{}}\ <<\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ <<\ \textcolor{stringliteral}{"{}\ of\ "{}}\ <<\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00889}00889\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a83acd923d19102c507faadb2f4e68f56}{GetVertexId}}\ ()\ <<\ \textcolor{stringliteral}{"{}'s\ "{}}\ <<}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00890}00890\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a5f9422d4f1f9df2f301cbd578e29ae7b}{GetLSA}}\ ()-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a882a042d18bcbdea3bc1a3eb55dcfe58}{GetNLinkRecords}}\ ()\ <<\ \textcolor{stringliteral}{"{}\ link\ records"{}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00891}00891\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00892}00892\ \textcolor{comment}{//\ (a)\ If\ this\ is\ a\ link\ to\ a\ stub\ network,\ examine\ the\ next\ link\ in\ V's\ LSA.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00893}00893\ \textcolor{comment}{//\ Links\ to\ stub\ networks\ will\ be\ considered\ in\ the\ second\ stage\ of\ the}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00894}00894\ \textcolor{comment}{//\ shortest\ path\ calculation.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00895}00895\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00896}00896\ \ \ \ \ \ \ \ \ \ \ l\ =\ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a5f9422d4f1f9df2f301cbd578e29ae7b}{GetLSA}}\ ()-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_acb5df9fec863df510911aa3e64d4aa04}{GetLinkRecord}}\ (\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00897}00897\ \ \ \ \ \ \ \ \ \ \ NS\_ASSERT\ (l\ !=\ 0);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00898}00898\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (l-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_ab9148eaf7a9d088a397e66164c1f30b9}{GetLinkType}}\ ()\ ==\ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_a93b89b9f89407a39712186911ad12a4ba31c95bb0542fb4fab6cb056f88eea561}{DGRRoutingLinkRecord::StubNetwork}})}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00899}00899\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00900}00900\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Found\ a\ Stub\ record\ to\ "{}}\ <<\ l-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_a9fe6e135674ef321bc11b48f90071857}{GetLinkId}}\ ());}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00901}00901\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00902}00902\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00903}00903\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00904}00904\ \textcolor{comment}{//\ (b)\ Otherwise,\ W\ is\ a\ transit\ vertex\ (router\ or\ transit\ network).\ \ Look\ up}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00905}00905\ \textcolor{comment}{//\ the\ vertex\ W's\ LSA\ (router-\/LSA\ or\ network-\/LSA)\ in\ Area\ A's\ link\ state}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00906}00906\ \textcolor{comment}{//\ database.\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00907}00907\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00908}00908\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (l-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_ab9148eaf7a9d088a397e66164c1f30b9}{GetLinkType}}\ ()\ ==\ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_a93b89b9f89407a39712186911ad12a4bac9c0a2d3da9eb9fdafee93e52a498c84}{DGRRoutingLinkRecord::PointToPoint}})}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00909}00909\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00910}00910\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00911}00911\ \textcolor{comment}{//\ Lookup\ the\ link\ state\ advertisement\ of\ the\ new\ link\ -\/-\/\ we\ call\ it\ <w>\ in}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00912}00912\ \textcolor{comment}{//\ the\ link\ state\ database.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00913}00913\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00914}00914\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ w\_lsa\ =\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a466e6a4182a792e33610a1a1e7a6b990}{m\_lsdb}}-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_l_s_d_b_a232013c41890eb75496e0201fd0689d2}{GetLSA}}\ (l-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_a9fe6e135674ef321bc11b48f90071857}{GetLinkId}}\ ());}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00915}00915\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NS\_ASSERT\ (w\_lsa);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00916}00916\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Found\ a\ P2P\ record\ from\ "{}}\ <<\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00917}00917\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a83acd923d19102c507faadb2f4e68f56}{GetVertexId}}\ ()\ <<\ \textcolor{stringliteral}{"{}\ to\ "{}}\ <<\ w\_lsa-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a0ec746b926044a548e4f3a09309322ce}{GetLinkStateId}}\ ());}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00918}00918\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00919}00919\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (l-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_ab9148eaf7a9d088a397e66164c1f30b9}{GetLinkType}}\ ()\ ==\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00920}00920\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_a93b89b9f89407a39712186911ad12a4baa0b0a272a289d2f1fcafdfedcde669b7}{DGRRoutingLinkRecord::TransitNetwork}})}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00921}00921\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00922}00922\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ w\_lsa\ =\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a466e6a4182a792e33610a1a1e7a6b990}{m\_lsdb}}-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_l_s_d_b_a232013c41890eb75496e0201fd0689d2}{GetLSA}}\ (l-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_a9fe6e135674ef321bc11b48f90071857}{GetLinkId}}\ ());}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00923}00923\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NS\_ASSERT\ (w\_lsa);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00924}00924\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Found\ a\ Transit\ record\ from\ "{}}\ <<\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00925}00925\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a83acd923d19102c507faadb2f4e68f56}{GetVertexId}}\ ()\ <<\ \textcolor{stringliteral}{"{}\ to\ "{}}\ <<\ w\_lsa-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a0ec746b926044a548e4f3a09309322ce}{GetLinkStateId}}\ ());}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00926}00926\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00927}00927\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00928}00928\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00929}00929\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NS\_ASSERT\_MSG\ (0,\ \textcolor{stringliteral}{"{}illegal\ Link\ Type"{}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00930}00930\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00931}00931\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00932}00932\ \textcolor{comment}{//\ Get\ w\_lsa:\ \ In\ case\ of\ V\ is\ Network-\/LSA}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00933}00933\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a5999846daefbeb25a5265e80e3f3a078}{GetVertexType}}\ ()\ ==\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a4e2ae872c20a6e44e2c53087a4e96ccea4cb6ddc9d2395166b87840984bc01880}{DGRVertex::VertexNetwork}})\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00934}00934\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00935}00935\ \ \ \ \ \ \ \ \ \ \ w\_lsa\ =\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a466e6a4182a792e33610a1a1e7a6b990}{m\_lsdb}}-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_l_s_d_b_ac6f9ca728688bae5adc4172dee708553}{GetLSAByLinkData}}\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00936}00936\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a5f9422d4f1f9df2f301cbd578e29ae7b}{GetLSA}}\ ()-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a1b5e5fa81d0506983a0755787a8d2d62}{GetAttachedRouter}}\ (\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}));}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00937}00937\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!w\_lsa)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00938}00938\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00939}00939\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00940}00940\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00941}00941\ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Found\ a\ Network\ LSA\ from\ "{}}\ <<\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00942}00942\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a83acd923d19102c507faadb2f4e68f56}{GetVertexId}}\ ()\ <<\ \textcolor{stringliteral}{"{}\ to\ "{}}\ <<\ w\_lsa-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a0ec746b926044a548e4f3a09309322ce}{GetLinkStateId}}\ ());}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00943}00943\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00944}00944\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00945}00945\ \textcolor{comment}{//\ Note:\ \ w\_lsa\ at\ this\ point\ may\ be\ either\ RouterLSA\ or\ NetworkLSA}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00946}00946\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00947}00947\ \textcolor{comment}{//\ (c)\ If\ vertex\ W\ is\ already\ on\ the\ shortest-\/path\ tree,\ examine\ the\ next}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00948}00948\ \textcolor{comment}{//\ link\ in\ the\ LSA.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00949}00949\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00950}00950\ \textcolor{comment}{//\ If\ the\ link\ is\ to\ a\ router\ that\ is\ already\ in\ the\ shortest\ path\ first\ tree}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00951}00951\ \textcolor{comment}{//\ then\ we\ have\ it\ covered\ -\/-\/\ ignore\ it.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00952}00952\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00953}00953\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (w\_lsa-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_afd80a2583858e08b8b3877a5401bf072}{GetStatus}}\ ()\ ==\ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a2d6cf227cde572e9c99d273a0e0fa5f7a0f88fe6c9e38275dc638a9ebb26018a2}{DGRRoutingLSA::LSA\_SPF\_IN\_SPFTREE}})\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00954}00954\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00955}00955\ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Skipping\ -\/>\ \ LSA\ "{}}<<\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00956}00956\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ w\_lsa-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a0ec746b926044a548e4f3a09309322ce}{GetLinkStateId}}\ ()\ <<\ \textcolor{stringliteral}{"{}\ already\ in\ SPF\ tree"{}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00957}00957\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00958}00958\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00959}00959\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00960}00960\ \textcolor{comment}{//\ (d)\ Calculate\ the\ link\ state\ cost\ D\ of\ the\ resulting\ path\ from\ the\ root\ to\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00961}00961\ \textcolor{comment}{//\ vertex\ W.\ \ D\ is\ equal\ to\ the\ sum\ of\ the\ link\ state\ cost\ of\ the\ (already\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00962}00962\ \textcolor{comment}{//\ calculated)\ shortest\ path\ to\ vertex\ V\ and\ the\ advertised\ cost\ of\ the\ link}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00963}00963\ \textcolor{comment}{//\ between\ vertices\ V\ and\ W.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00964}00964\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00965}00965\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a5f9422d4f1f9df2f301cbd578e29ae7b}{GetLSA}}\ ()-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_aa00b07a4d8639539e94817f98905ef19}{GetLSType}}\ ()\ ==\ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a38d676a01a677ff003f198d454cf0694a0322ce07c2b94cdb14163bbe04cb9674}{DGRRoutingLSA::RouterLSA}})}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00966}00966\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00967}00967\ \ \ \ \ \ \ \ \ \ \ NS\_ASSERT\ (l\ !=\ 0);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00968}00968\ \ \ \ \ \ \ \ \ \ \ distance\ =\ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a307ee8139d815f7f26b8cf01e6885b53}{GetDistanceFromRoot}}\ ()\ +\ l-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_af96cb9a05b3d95d14b6af29e058e3712}{GetMetric}}\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00969}00969\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00970}00970\ \ \ \ \ \ \ \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00971}00971\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00972}00972\ \ \ \ \ \ \ \ \ \ \ distance\ =\ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a307ee8139d815f7f26b8cf01e6885b53}{GetDistanceFromRoot}}\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00973}00973\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00974}00974\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00975}00975\ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Considering\ w\_lsa\ "{}}\ <<\ w\_lsa-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a0ec746b926044a548e4f3a09309322ce}{GetLinkStateId}}\ ());}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00976}00976\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00977}00977\ \textcolor{comment}{//\ Is\ there\ already\ vertex\ w\ in\ candidate\ list?}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00978}00978\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (w\_lsa-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_afd80a2583858e08b8b3877a5401bf072}{GetStatus}}\ ()\ ==\ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a2d6cf227cde572e9c99d273a0e0fa5f7ac563232b34162339268c7804c93765ad}{DGRRoutingLSA::LSA\_SPF\_NOT\_EXPLORED}})}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00979}00979\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00980}00980\ \textcolor{comment}{//\ Calculate\ nexthop\ to\ w}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00981}00981\ \textcolor{comment}{//\ We\ need\ to\ figure\ out\ how\ to\ actually\ get\ to\ the\ new\ router\ represented}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00982}00982\ \textcolor{comment}{//\ by\ <w>.\ \ This\ will\ (among\ other\ things)\ find\ the\ next\ hop\ address\ to\ send}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00983}00983\ \textcolor{comment}{//\ packets\ destined\ for\ this\ network\ to,\ and\ also\ find\ the\ outbound\ interface}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00984}00984\ \textcolor{comment}{//\ used\ to\ forward\ the\ packets.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00985}00985\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00986}00986\ \textcolor{comment}{//\ prepare\ vertex\ w}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00987}00987\ \ \ \ \ \ \ \ \ \ \ w\ =\ \textcolor{keyword}{new}\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex}{DGRVertex}}\ (w\_lsa);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00988}00988\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_aa10b6b58af69a3da1d8478d50e78bef8}{SPFNexthopCalculation}}\ (v,\ w,\ l,\ distance))}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00989}00989\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00990}00990\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ w\_lsa-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a497453d1271c0020968487ec8ead99c5}{SetStatus}}\ (\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a2d6cf227cde572e9c99d273a0e0fa5f7a196d95882ef494ff03d1549a998ba12c}{DGRRoutingLSA::LSA\_SPF\_CANDIDATE}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00991}00991\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00992}00992\ \textcolor{comment}{//\ Push\ this\ new\ vertex\ onto\ the\ priority\ queue\ (ordered\ by\ distance\ from\ the}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00993}00993\ \textcolor{comment}{//\ root\ node).}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00994}00994\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00995}00995\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ candidate.\mbox{\hyperlink{classns3_1_1_d_g_r_candidate_queue_ae02f69062ca21f025cba41d535491b87}{Push}}\ (w);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00996}00996\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Pushing\ "{}}\ <<\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00997}00997\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ w-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a83acd923d19102c507faadb2f4e68f56}{GetVertexId}}\ ()\ <<\ \textcolor{stringliteral}{"{},\ parent\ vertexId:\ "{}}\ <<}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00998}00998\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a83acd923d19102c507faadb2f4e68f56}{GetVertexId}}\ ()\ <<\ \textcolor{stringliteral}{"{},\ distance:\ "{}}\ <<}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l00999}00999\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ w-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a307ee8139d815f7f26b8cf01e6885b53}{GetDistanceFromRoot}}\ ());}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01000}01000\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01001}01001\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01002}01002\ \ \ \ \ \ \ \ \ \ \ \ \ NS\_ASSERT\_MSG\ (0,\ \textcolor{stringliteral}{"{}SPFNexthopCalculation\ never\ "{}}\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01003}01003\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ <<\ \textcolor{stringliteral}{"{}return\ false,\ but\ it\ does\ now!"{}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01004}01004\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01005}01005\ \ \ \ \ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (w\_lsa-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_afd80a2583858e08b8b3877a5401bf072}{GetStatus}}\ ()\ ==\ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a2d6cf227cde572e9c99d273a0e0fa5f7a196d95882ef494ff03d1549a998ba12c}{DGRRoutingLSA::LSA\_SPF\_CANDIDATE}})}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01006}01006\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01007}01007\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01008}01008\ \textcolor{comment}{//\ We\ have\ already\ considered\ the\ link\ represented\ by\ <w>.\ \ What\ wse\ have\ to}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01009}01009\ \textcolor{comment}{//\ do\ now\ is\ to\ decide\ if\ this\ new\ router\ represents\ a\ route\ with\ a\ shorter}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01010}01010\ \textcolor{comment}{//\ distance\ metric.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01011}01011\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01012}01012\ \textcolor{comment}{//\ So,\ locate\ the\ vertex\ in\ the\ candidate\ queue\ and\ take\ a\ look\ at\ the\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01013}01013\ \textcolor{comment}{//\ distance.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01014}01014\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01015}01015\ \textcolor{comment}{/*\ (quagga-\/0.98.6)\ W\ is\ already\ on\ the\ candidate\ list;\ call\ it\ cw.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01016}01016\ \textcolor{comment}{*\ Compare\ the\ previously\ calculated\ cost\ (cw-\/>distance)}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01017}01017\ \textcolor{comment}{*\ with\ the\ cost\ we\ just\ determined\ (w-\/>distance)\ to\ see}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01018}01018\ \textcolor{comment}{*\ if\ we've\ found\ a\ shorter\ path.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01019}01019\ \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01020}01020\ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex}{DGRVertex}}*\ cw;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01021}01021\ \ \ \ \ \ \ \ \ \ \ cw\ =\ candidate.\mbox{\hyperlink{classns3_1_1_d_g_r_candidate_queue_a0059b97ee38bc933def96f22719e90c8}{Find}}\ (w\_lsa-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a0ec746b926044a548e4f3a09309322ce}{GetLinkStateId}}\ ());}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01022}01022\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (cw-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a307ee8139d815f7f26b8cf01e6885b53}{GetDistanceFromRoot}}\ ()\ <\ distance)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01023}01023\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01024}01024\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01025}01025\ \textcolor{comment}{//\ This\ is\ not\ a\ shorter\ path,\ so\ don't\ do\ anything.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01026}01026\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01027}01027\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01028}01028\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01029}01029\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (cw-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a307ee8139d815f7f26b8cf01e6885b53}{GetDistanceFromRoot}}\ ()\ ==\ distance)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01030}01030\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01031}01031\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01032}01032\ \textcolor{comment}{//\ This\ path\ is\ one\ with\ an\ equal\ cost.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01033}01033\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01034}01034\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Equal\ cost\ multiple\ paths\ found."{}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01035}01035\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01036}01036\ \textcolor{comment}{//\ At\ this\ point,\ there\ are\ two\ instances\ 'w'\ and\ 'cw'\ of\ the}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01037}01037\ \textcolor{comment}{//\ same\ vertex,\ the\ vertex\ that\ is\ currently\ being\ considered}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01038}01038\ \textcolor{comment}{//\ for\ adding\ into\ the\ shortest\ path\ tree.\ 'w'\ is\ the\ instance}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01039}01039\ \textcolor{comment}{//\ as\ seen\ from\ the\ root\ via\ vertex\ 'v',\ and\ 'cw'\ is\ the\ instance\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01040}01040\ \textcolor{comment}{//\ as\ seen\ from\ the\ root\ via\ some\ other\ vertices\ other\ than\ 'v'.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01041}01041\ \textcolor{comment}{//\ These\ two\ instances\ are\ being\ merged\ in\ the\ following\ code.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01042}01042\ \textcolor{comment}{//\ In\ particular,\ the\ parent\ nodes,\ the\ next\ hops,\ and\ the\ root's}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01043}01043\ \textcolor{comment}{//\ output\ interfaces\ of\ the\ two\ instances\ are\ being\ merged.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01044}01044\ \textcolor{comment}{//\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01045}01045\ \textcolor{comment}{//\ Note\ that\ this\ is\ functionally\ equivalent\ to\ calling}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01046}01046\ \textcolor{comment}{//\ ospf\_nexthop\_merge\ (cw-\/>nexthop,\ w-\/>nexthop)\ in\ quagga-\/0.98.6}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01047}01047\ \textcolor{comment}{//\ (ospf\_spf.c::859),\ although\ the\ detail\ implementation}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01048}01048\ \textcolor{comment}{//\ is\ very\ different\ from\ quagga\ (blame\ ns3::DGRRouteManagerImpl)}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01049}01049\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01050}01050\ \textcolor{comment}{//\ prepare\ vertex\ w}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01051}01051\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ w\ =\ \textcolor{keyword}{new}\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex}{DGRVertex}}\ (w\_lsa);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01052}01052\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_aa10b6b58af69a3da1d8478d50e78bef8}{SPFNexthopCalculation}}\ (v,\ w,\ l,\ distance);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01053}01053\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ cw-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_abfd711c43e166fc59f65235af75c4c07}{MergeRootExitDirections}}\ (w);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01054}01054\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ cw-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_aa8a039e85d0a64c8451a8ea69ddd3fc0}{MergeParent}}\ (w);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01055}01055\ \textcolor{comment}{//\ DGRVertexAddParent\ (w)\ is\ necessary\ as\ the\ destructor\ of\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01056}01056\ \textcolor{comment}{//\ DGRVertex\ checks\ if\ the\ vertex\ and\ its\ parent\ is\ linked}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01057}01057\ \textcolor{comment}{//\ bidirectionally}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01058}01058\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a98dcc2494c9f368e4cfed15ead8a2990}{DGRVertexAddParent}}\ (w);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01059}01059\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{delete}\ w;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01060}01060\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01061}01061\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}\ \textcolor{comment}{//\ cw-\/>GetDistanceFromRoot\ ()\ >\ w-\/>GetDistanceFromRoot\ ()}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01062}01062\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01063}01063\ \textcolor{comment}{//\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01064}01064\ \textcolor{comment}{//\ this\ path\ represents\ a\ new,\ lower-\/cost\ path\ to\ <w>\ (the\ vertex\ we\ found\ in}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01065}01065\ \textcolor{comment}{//\ the\ current\ link\ record\ of\ the\ link\ state\ advertisement\ of\ the\ current\ root}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01066}01066\ \textcolor{comment}{//\ (vertex\ <v>)}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01067}01067\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01068}01068\ \textcolor{comment}{//\ N.B.\ the\ nexthop\_calculation\ is\ conditional,\ if\ it\ finds\ a\ valid\ nexthop}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01069}01069\ \textcolor{comment}{//\ it\ will\ call\ spf\_add\_parents,\ which\ will\ flush\ the\ old\ parents}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01070}01070\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01071}01071\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_aa10b6b58af69a3da1d8478d50e78bef8}{SPFNexthopCalculation}}\ (v,\ cw,\ l,\ distance))}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01072}01072\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01073}01073\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01074}01074\ \textcolor{comment}{//\ If\ we've\ changed\ the\ cost\ to\ get\ to\ the\ vertex\ represented\ by\ <w>,\ we\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01075}01075\ \textcolor{comment}{//\ must\ reorder\ the\ priority\ queue\ keyed\ to\ that\ cost.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01076}01076\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01077}01077\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ candidate.\mbox{\hyperlink{classns3_1_1_d_g_r_candidate_queue_a8745d6ce64bdbdc57e731025c7e78935}{Reorder}}\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01078}01078\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01079}01079\ \ \ \ \ \ \ \ \ \ \ \ \ \}\ \textcolor{comment}{//\ new\ lower\ cost\ path\ found}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01080}01080\ \ \ \ \ \ \ \ \ \}\ \textcolor{comment}{//\ end\ W\ is\ already\ on\ the\ candidate\ list}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01081}01081\ \ \ \ \ \}\ \textcolor{comment}{//\ end\ loop\ over\ the\ links\ in\ V's\ LSA}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01082}01082\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01083}01083\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01084}01084\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01085}01085\ \textcolor{comment}{//\ This\ method\ is\ derived\ from\ quagga\ ospf\_nexthop\_calculation()\ 16.1.1.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01086}01086\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01087}01087\ \textcolor{comment}{//\ Calculate\ nexthop\ from\ root\ through\ V\ (parent)\ to\ vertex\ W\ (destination)}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01088}01088\ \textcolor{comment}{//\ with\ given\ distance\ from\ root-\/>W.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01089}01089\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01090}01090\ \textcolor{comment}{//\ As\ appropriate,\ set\ w's\ parent,\ distance,\ and\ nexthop\ information}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01091}01091\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01092}01092\ \textcolor{comment}{//\ For\ now,\ this\ is\ greatly\ simplified\ from\ the\ quagga\ code}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01093}01093\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01094}01094\ \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01095}\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_aa10b6b58af69a3da1d8478d50e78bef8}{01095}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_aa10b6b58af69a3da1d8478d50e78bef8}{DGRRouteManagerImpl::SPFNexthopCalculation}}\ (}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01096}01096\ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex}{DGRVertex}}*\ v,\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01097}01097\ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex}{DGRVertex}}*\ w,}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01098}01098\ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record}{DGRRoutingLinkRecord}}*\ l,}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01099}01099\ \ \ uint32\_t\ distance)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01100}01100\ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01101}01101\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ v\ <<\ w\ <<\ l\ <<\ distance);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01102}01102\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01103}01103\ \textcolor{comment}{//\ If\ w\ is\ a\ NetworkVertex,\ l\ should\ be\ null}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01104}01104\ \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01105}01105\ \textcolor{comment}{\ \ if\ (w-\/>GetVertexType\ ()\ ==\ DGRVertex::VertexNetwork\ \&\&\ l)}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01106}01106\ \textcolor{comment}{\ \ \ \ \{}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01107}01107\ \textcolor{comment}{\ \ \ \ \ \ \ \ NS\_ASSERT\_MSG\ (0,\ "{}Error:\ \ SPFNexthopCalculation\ parameter\ problem"{});}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01108}01108\ \textcolor{comment}{\ \ \ \ \}}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01109}01109\ \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01110}01110\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01111}01111\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01112}01112\ \textcolor{comment}{//\ The\ vertex\ m\_spfroot\ is\ a\ distinguished\ vertex\ representing\ the\ node\ at}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01113}01113\ \textcolor{comment}{//\ the\ root\ of\ the\ calculations.\ \ That\ is,\ it\ is\ the\ node\ for\ which\ we\ are}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01114}01114\ \textcolor{comment}{//\ calculating\ the\ routes.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01115}01115\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01116}01116\ \textcolor{comment}{//\ There\ are\ two\ distinct\ cases\ for\ calculating\ the\ next\ hop\ information.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01117}01117\ \textcolor{comment}{//\ First,\ if\ we're\ considering\ a\ hop\ from\ the\ root\ to\ an\ "{}adjacent"{}\ network}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01118}01118\ \textcolor{comment}{//\ (one\ that\ is\ on\ the\ other\ side\ of\ a\ point-\/to-\/point\ link\ connected\ to\ the}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01119}01119\ \textcolor{comment}{//\ root),\ then\ we\ need\ to\ store\ the\ information\ needed\ to\ forward\ down\ that}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01120}01120\ \textcolor{comment}{//\ link.\ \ The\ second\ case\ is\ if\ the\ network\ is\ not\ directly\ adjacent.\ \ In\ that}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01121}01121\ \textcolor{comment}{//\ case\ we\ need\ to\ use\ the\ forwarding\ information\ from\ the\ vertex\ on\ the\ path}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01122}01122\ \textcolor{comment}{//\ to\ the\ destination\ that\ is\ directly\ adjacent\ [node\ 1]\ in\ both\ cases\ of\ the}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01123}01123\ \textcolor{comment}{//\ diagram\ below.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01124}01124\ \textcolor{comment}{//\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01125}01125\ \textcolor{comment}{//\ (1)\ [root]\ -\/>\ [point-\/to-\/point]\ -\/>\ [node\ 1]}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01126}01126\ \textcolor{comment}{//\ (2)\ [root]\ -\/>\ [point-\/to-\/point]\ -\/>\ [node\ 1]\ -\/>\ [point-\/to-\/point]\ -\/>\ [node\ 2]}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01127}01127\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01128}01128\ \textcolor{comment}{//\ We\ call\ the\ propagation\ of\ next\ hop\ information\ down\ vertices\ of\ a\ path}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01129}01129\ \textcolor{comment}{//\ "{}inheriting"{}\ the\ next\ hop\ information.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01130}01130\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01131}01131\ \textcolor{comment}{//\ The\ point-\/to-\/point\ link\ information\ is\ only\ useful\ in\ this\ calculation\ when}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01132}01132\ \textcolor{comment}{//\ we\ are\ examining\ the\ root\ node.\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01133}01133\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01134}01134\ \ \ \textcolor{keywordflow}{if}\ (v\ ==\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a51238c1122fc794564a658bf852d6910}{m\_spfroot}})}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01135}01135\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01136}01136\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01137}01137\ \textcolor{comment}{//\ In\ this\ case\ <v>\ is\ the\ root\ node,\ which\ means\ it\ is\ the\ starting\ point}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01138}01138\ \textcolor{comment}{//\ for\ the\ packets\ forwarded\ by\ that\ node.\ \ This\ also\ means\ that\ the\ next\ hop}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01139}01139\ \textcolor{comment}{//\ address\ of\ packets\ headed\ for\ some\ arbitrary\ off-\/network\ destination\ must}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01140}01140\ \textcolor{comment}{//\ be\ the\ destination\ at\ the\ other\ end\ of\ one\ of\ the\ links\ off\ of\ the\ root}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01141}01141\ \textcolor{comment}{//\ node\ if\ this\ root\ node\ is\ a\ router.\ \ We\ then\ need\ to\ see\ if\ this\ node\ <w>}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01142}01142\ \textcolor{comment}{//\ is\ a\ router.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01143}01143\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01144}01144\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (w-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a5999846daefbeb25a5265e80e3f3a078}{GetVertexType}}\ ()\ ==\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a4e2ae872c20a6e44e2c53087a4e96ccea0d137433dfa77b24862a5f2c116da286}{DGRVertex::VertexRouter}})\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01145}01145\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01146}01146\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01147}01147\ \textcolor{comment}{//\ In\ the\ case\ of\ point-\/to-\/point\ links,\ the\ link\ data\ field\ (m\_linkData)\ of\ a}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01148}01148\ \textcolor{comment}{//\ Global\ Router\ Link\ Record\ contains\ the\ local\ IP\ address.\ \ If\ we\ look\ at\ the}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01149}01149\ \textcolor{comment}{//\ link\ record\ describing\ the\ link\ from\ the\ perspecive\ of\ <w>\ (the\ remote}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01150}01150\ \textcolor{comment}{//\ node\ from\ the\ viewpoint\ of\ <v>)\ back\ to\ the\ root\ node,\ we\ can\ discover\ the}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01151}01151\ \textcolor{comment}{//\ IP\ address\ of\ the\ router\ to\ which\ <v>\ is\ adjacent.\ \ This\ is\ a\ distinguished}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01152}01152\ \textcolor{comment}{//\ address\ -\/-\/\ the\ next\ hop\ address\ to\ get\ from\ <v>\ to\ <w>\ and\ all\ networks\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01153}01153\ \textcolor{comment}{//\ accessed\ through\ that\ path.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01154}01154\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01155}01155\ \textcolor{comment}{//\ SPFGetNextLink\ ()\ is\ a\ little\ odd.\ \ used\ in\ this\ way\ it\ is\ just\ going\ to}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01156}01156\ \textcolor{comment}{//\ return\ the\ link\ record\ describing\ the\ link\ from\ <w>\ to\ <v>.\ \ Think\ of\ it\ as}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01157}01157\ \textcolor{comment}{//\ SPFGetLink.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01158}01158\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01159}01159\ \ \ \ \ \ \ \ \ \ \ NS\_ASSERT\ (l);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01160}01160\ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record}{DGRRoutingLinkRecord}}\ *linkRemote\ =\ 0;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01161}01161\ \ \ \ \ \ \ \ \ \ \ linkRemote\ =\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a1ac857e005409b302b1bd2fb1180af0a}{SPFGetNextLink}}\ (w,\ v,\ linkRemote);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01162}01162\ \textcolor{comment}{//\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01163}01163\ \textcolor{comment}{//\ At\ this\ point,\ <l>\ is\ the\ Global\ Router\ Link\ Record\ describing\ the\ point-\/}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01164}01164\ \textcolor{comment}{//\ to\ point\ link\ from\ <v>\ to\ <w>\ from\ the\ perspective\ of\ <v>;\ and\ <linkRemote>}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01165}01165\ \textcolor{comment}{//\ is\ the\ Global\ Router\ Link\ Record\ describing\ that\ same\ link\ from\ the\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01166}01166\ \textcolor{comment}{//\ perspective\ of\ <w>\ (back\ to\ <v>).\ \ Now\ we\ can\ just\ copy\ the\ next\ hop\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01167}01167\ \textcolor{comment}{//\ address\ from\ the\ m\_linkData\ member\ variable.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01168}01168\ \textcolor{comment}{//\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01169}01169\ \textcolor{comment}{//\ The\ next\ hop\ member\ variable\ we\ put\ in\ <w>\ has\ the\ sense\ "{}in\ order\ to\ get}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01170}01170\ \textcolor{comment}{//\ from\ the\ root\ node\ to\ the\ host\ represented\ by\ vertex\ <w>,\ you\ have\ to\ send}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01171}01171\ \textcolor{comment}{//\ the\ packet\ to\ the\ next\ hop\ address\ specified\ in\ w-\/>m\_nextHop.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01172}01172\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01173}01173\ \ \ \ \ \ \ \ \ \ \ Ipv4Address\ nextHop\ =\ linkRemote-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_a97080a8409f77898f4485230be0be5e4}{GetLinkData}}\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01174}01174\ \textcolor{comment}{//\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01175}01175\ \textcolor{comment}{//\ Now\ find\ the\ outgoing\ interface\ corresponding\ to\ the\ point\ to\ point\ link}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01176}01176\ \textcolor{comment}{//\ from\ the\ perspective\ of\ <v>\ -\/-\/\ remember\ that\ <l>\ is\ the\ link\ "{}from"{}}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01177}01177\ \textcolor{comment}{//\ <v>\ "{}to"{}\ <w>.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01178}01178\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01179}01179\ \ \ \ \ \ \ \ \ \ \ uint32\_t\ outIf\ =\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a017c230a5a38bc81243ebf39e94bd36b}{FindOutgoingInterfaceId}}\ (l-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_a97080a8409f77898f4485230be0be5e4}{GetLinkData}}\ ());}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01180}01180\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01181}01181\ \ \ \ \ \ \ \ \ \ \ w-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_ae9023c5885bfce6327e2f8f1f360e961}{SetRootExitDirection}}\ (nextHop,\ outIf);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01182}01182\ \ \ \ \ \ \ \ \ \ \ w-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a4b5aa6f4683f8736530d15c60f2538a5}{SetDistanceFromRoot}}\ (distance);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01183}01183\ \ \ \ \ \ \ \ \ \ \ w-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a8ce35999d67d3028792f043c1efdf075}{SetParent}}\ (v);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01184}01184\ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Next\ hop\ from\ "{}}\ <<\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01185}01185\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a83acd923d19102c507faadb2f4e68f56}{GetVertexId}}\ ()\ <<\ \textcolor{stringliteral}{"{}\ to\ "{}}\ <<\ w-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a83acd923d19102c507faadb2f4e68f56}{GetVertexId}}\ ()\ <<}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01186}01186\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\ goes\ through\ next\ hop\ "{}}\ <<\ nextHop\ <<}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01187}01187\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\ via\ outgoing\ interface\ "{}}\ <<\ outIf\ <<}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01188}01188\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\ with\ distance\ "{}}\ <<\ distance);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01189}01189\ \ \ \ \ \ \ \ \ \}\ \ \textcolor{comment}{//\ end\ W\ is\ a\ router\ vertes}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01190}01190\ \ \ \ \ \ \ \textcolor{keywordflow}{else}\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01191}01191\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01192}01192\ \ \ \ \ \ \ \ \ \ \ NS\_ASSERT\ (w-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a5999846daefbeb25a5265e80e3f3a078}{GetVertexType}}\ ()\ ==\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a4e2ae872c20a6e44e2c53087a4e96ccea4cb6ddc9d2395166b87840984bc01880}{DGRVertex::VertexNetwork}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01193}01193\ \textcolor{comment}{//\ W\ is\ a\ directly\ connected\ network;\ no\ next\ hop\ is\ required}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01194}01194\ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a}{DGRRoutingLSA}}*\ w\_lsa\ =\ w-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a5f9422d4f1f9df2f301cbd578e29ae7b}{GetLSA}}\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01195}01195\ \ \ \ \ \ \ \ \ \ \ NS\_ASSERT\ (w\_lsa-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_aa00b07a4d8639539e94817f98905ef19}{GetLSType}}\ ()\ ==\ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a38d676a01a677ff003f198d454cf0694a5d51f5653b9ddf1d8bf640932068cb85}{DGRRoutingLSA::NetworkLSA}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01196}01196\ \textcolor{comment}{//\ Find\ outgoing\ interface\ ID\ for\ this\ network}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01197}01197\ \ \ \ \ \ \ \ \ \ \ uint32\_t\ outIf\ =\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a017c230a5a38bc81243ebf39e94bd36b}{FindOutgoingInterfaceId}}\ (w\_lsa-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a0ec746b926044a548e4f3a09309322ce}{GetLinkStateId}}\ (),\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01198}01198\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ w\_lsa-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a3e3b9552f26b930f47dd069eaf0f3950}{GetNetworkLSANetworkMask}}\ ()\ );}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01199}01199\ \textcolor{comment}{//\ Set\ the\ next\ hop\ to\ 0.0.0.0\ meaning\ "{}not\ exist"{}}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01200}01200\ \ \ \ \ \ \ \ \ \ \ Ipv4Address\ nextHop\ =\ Ipv4Address::GetZero\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01201}01201\ \ \ \ \ \ \ \ \ \ \ w-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_ae9023c5885bfce6327e2f8f1f360e961}{SetRootExitDirection}}\ (nextHop,\ outIf);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01202}01202\ \ \ \ \ \ \ \ \ \ \ w-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a4b5aa6f4683f8736530d15c60f2538a5}{SetDistanceFromRoot}}\ (distance);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01203}01203\ \ \ \ \ \ \ \ \ \ \ w-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a8ce35999d67d3028792f043c1efdf075}{SetParent}}\ (v);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01204}01204\ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Next\ hop\ from\ "{}}\ <<\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01205}01205\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a83acd923d19102c507faadb2f4e68f56}{GetVertexId}}\ ()\ <<\ \textcolor{stringliteral}{"{}\ to\ network\ "{}}\ <<\ w-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a83acd923d19102c507faadb2f4e68f56}{GetVertexId}}\ ()\ <<}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01206}01206\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\ via\ outgoing\ interface\ "{}}\ <<\ outIf\ <<}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01207}01207\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\ with\ distance\ "{}}\ <<\ distance);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01208}01208\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ 1;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01209}01209\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01210}01210\ \ \ \ \ \}\ \textcolor{comment}{//\ end\ v\ is\ the\ root}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01211}01211\ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a5999846daefbeb25a5265e80e3f3a078}{GetVertexType}}\ ()\ ==\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a4e2ae872c20a6e44e2c53087a4e96ccea4cb6ddc9d2395166b87840984bc01880}{DGRVertex::VertexNetwork}})\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01212}01212\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01213}01213\ \textcolor{comment}{//\ See\ if\ any\ of\ v's\ parents\ are\ the\ root}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01214}01214\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a6937ca725aa1a7f5284d1b75a5dfb9f8}{GetParent}}\ ()\ ==\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a51238c1122fc794564a658bf852d6910}{m\_spfroot}})}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01215}01215\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01216}01216\ \textcolor{comment}{//\ 16.1.1\ para\ 5.\ ...the\ parent\ vertex\ is\ a\ network\ that}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01217}01217\ \textcolor{comment}{//\ directly\ connects\ the\ calculating\ router\ to\ the\ destination}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01218}01218\ \textcolor{comment}{//\ router.\ \ The\ list\ of\ next\ hops\ is\ then\ determined\ by}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01219}01219\ \textcolor{comment}{//\ examining\ the\ destination's\ router-\/LSA...}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01220}01220\ \ \ \ \ \ \ \ \ \ \ NS\_ASSERT\ (w-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a5999846daefbeb25a5265e80e3f3a078}{GetVertexType}}\ ()\ ==\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a4e2ae872c20a6e44e2c53087a4e96ccea0d137433dfa77b24862a5f2c116da286}{DGRVertex::VertexRouter}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01221}01221\ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record}{DGRRoutingLinkRecord}}\ *linkRemote\ =\ 0;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01222}01222\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{while}\ ((linkRemote\ =\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a1ac857e005409b302b1bd2fb1180af0a}{SPFGetNextLink}}\ (w,\ v,\ linkRemote)))}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01223}01223\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01224}01224\ \textcolor{comment}{/*\ ...For\ each\ link\ in\ the\ router-\/LSA\ that\ points\ back\ to\ the}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01225}01225\ \textcolor{comment}{\ *\ parent\ network,\ the\ link's\ Link\ Data\ field\ provides\ the\ IP}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01226}01226\ \textcolor{comment}{\ *\ address\ of\ a\ next\ hop\ router.\ \ The\ outgoing\ interface\ to}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01227}01227\ \textcolor{comment}{\ *\ use\ can\ then\ be\ derived\ from\ the\ next\ hop\ IP\ address\ (or\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01228}01228\ \textcolor{comment}{\ *\ it\ can\ be\ inherited\ from\ the\ parent\ network).}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01229}01229\ \textcolor{comment}{\ */}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01230}01230\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Ipv4Address\ nextHop\ =\ linkRemote-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_a97080a8409f77898f4485230be0be5e4}{GetLinkData}}\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01231}01231\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ uint32\_t\ outIf\ =\ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a9e66f0b2ee7432156046e75672968138}{GetRootExitDirection}}\ ().second;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01232}01232\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ w-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_ae9023c5885bfce6327e2f8f1f360e961}{SetRootExitDirection}}\ (nextHop,\ outIf);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01233}01233\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Next\ hop\ from\ "{}}\ <<}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01234}01234\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a83acd923d19102c507faadb2f4e68f56}{GetVertexId}}\ ()\ <<\ \textcolor{stringliteral}{"{}\ to\ "{}}\ <<\ w-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a83acd923d19102c507faadb2f4e68f56}{GetVertexId}}\ ()\ <<}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01235}01235\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\ goes\ through\ next\ hop\ "{}}\ <<\ nextHop\ <<}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01236}01236\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\ via\ outgoing\ interface\ "{}}\ <<\ outIf);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01237}01237\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01238}01238\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01239}01239\ \ \ \ \ \ \ \textcolor{keywordflow}{else}\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01240}01240\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01241}01241\ \ \ \ \ \ \ \ \ \ \ w-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_ae9023c5885bfce6327e2f8f1f360e961}{SetRootExitDirection}}\ (v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a9e66f0b2ee7432156046e75672968138}{GetRootExitDirection}}\ ());}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01242}01242\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01243}01243\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01244}01244\ \ \ \textcolor{keywordflow}{else}\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01245}01245\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01246}01246\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01247}01247\ \textcolor{comment}{//\ If\ we're\ calculating\ the\ next\ hop\ information\ from\ a\ node\ (v)\ that\ is\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01248}01248\ \textcolor{comment}{//\ *not*\ the\ root,\ then\ we\ need\ to\ "{}inherit"{}\ the\ information\ needed\ to}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01249}01249\ \textcolor{comment}{//\ forward\ the\ packet\ from\ the\ vertex\ closer\ to\ the\ root.\ \ That\ is,\ we'll}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01250}01250\ \textcolor{comment}{//\ still\ send\ packets\ to\ the\ next\ hop\ address\ of\ the\ router\ adjacent\ to\ the}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01251}01251\ \textcolor{comment}{//\ root\ on\ the\ path\ toward\ <w>.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01252}01252\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01253}01253\ \textcolor{comment}{//\ Above,\ when\ we\ were\ considering\ the\ root\ node,\ we\ calculated\ the\ next\ hop}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01254}01254\ \textcolor{comment}{//\ address\ and\ outgoing\ interface\ required\ to\ get\ off\ of\ the\ root\ network.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01255}01255\ \textcolor{comment}{//\ At\ this\ point,\ we\ are\ further\ away\ from\ the\ root\ network\ along\ one\ of\ the}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01256}01256\ \textcolor{comment}{//\ (shortest)\ paths.\ \ So\ the\ next\ hop\ and\ outoing\ interface\ remain\ the\ same}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01257}01257\ \textcolor{comment}{//\ (are\ inherited).}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01258}01258\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01259}01259\ \ \ \ \ \ \ w-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_aacb7dfc43225f6d7eca87f103c40c526}{InheritAllRootExitDirections}}\ (v);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01260}01260\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01261}01261\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01262}01262\ \textcolor{comment}{//\ In\ all\ cases,\ we\ need\ valid\ values\ for\ the\ distance\ metric\ and\ a\ parent.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01263}01263\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01264}01264\ \ \ w-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a4b5aa6f4683f8736530d15c60f2538a5}{SetDistanceFromRoot}}\ (distance);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01265}01265\ \ \ w-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a8ce35999d67d3028792f043c1efdf075}{SetParent}}\ (v);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01266}01266\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01267}01267\ \ \ \textcolor{keywordflow}{return}\ 1;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01268}01268\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01269}01269\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01270}01270\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01271}01271\ \textcolor{comment}{//\ This\ method\ is\ derived\ from\ quagga\ ospf\_get\_next\_link\ ()}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01272}01272\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01273}01273\ \textcolor{comment}{//\ First\ search\ the\ Global\ Router\ Link\ Records\ of\ vertex\ <v>\ for\ one}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01274}01274\ \textcolor{comment}{//\ representing\ a\ point-\/to\ point\ link\ to\ vertex\ <w>.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01275}01275\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01276}01276\ \textcolor{comment}{//\ What\ is\ done\ depends\ on\ prev\_link.\ \ Contrary\ to\ appearances,\ prev\_link\ just}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01277}01277\ \textcolor{comment}{//\ acts\ as\ a\ flag\ here.\ \ If\ prev\_link\ is\ NULL,\ we\ return\ the\ first\ Global}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01278}01278\ \textcolor{comment}{//\ Router\ Link\ Record\ we\ find\ that\ describes\ a\ point-\/to-\/point\ link\ from\ <v>\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01279}01279\ \textcolor{comment}{//\ to\ <w>.\ \ If\ prev\_link\ is\ not\ NULL,\ we\ return\ a\ Global\ Router\ Link\ Record}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01280}01280\ \textcolor{comment}{//\ representing\ a\ possible\ *second*\ link\ from\ <v>\ to\ <w>.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01281}01281\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01282}01282\ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record}{DGRRoutingLinkRecord}}*}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01283}\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a1ac857e005409b302b1bd2fb1180af0a}{01283}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a1ac857e005409b302b1bd2fb1180af0a}{DGRRouteManagerImpl::SPFGetNextLink}}\ (}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01284}01284\ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex}{DGRVertex}}*\ v,}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01285}01285\ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex}{DGRVertex}}*\ w,}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01286}01286\ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record}{DGRRoutingLinkRecord}}*\ prev\_link)\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01287}01287\ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01288}01288\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ v\ <<\ w\ <<\ prev\_link);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01289}01289\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01290}01290\ \ \ \textcolor{keywordtype}{bool}\ skip\ =\ \textcolor{keyword}{true};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01291}01291\ \ \ \textcolor{keywordtype}{bool}\ found\_prev\_link\ =\ \textcolor{keyword}{false};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01292}01292\ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record}{DGRRoutingLinkRecord}}*\ l;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01293}01293\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01294}01294\ \textcolor{comment}{//\ If\ prev\_link\ is\ 0,\ we\ are\ really\ looking\ for\ the\ first\ link,\ not\ the\ next\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01295}01295\ \textcolor{comment}{//\ link.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01296}01296\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01297}01297\ \ \ \textcolor{keywordflow}{if}\ (prev\_link\ ==\ 0)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01298}01298\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01299}01299\ \ \ \ \ \ \ skip\ =\ \textcolor{keyword}{false};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01300}01300\ \ \ \ \ \ \ found\_prev\_link\ =\ \textcolor{keyword}{true};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01301}01301\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01302}01302\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01303}01303\ \textcolor{comment}{//\ Iterate\ through\ the\ Global\ Router\ Link\ Records\ advertised\ by\ the\ vertex}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01304}01304\ \textcolor{comment}{//\ <v>\ looking\ for\ records\ representing\ the\ point-\/to-\/point\ links\ off\ of\ this}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01305}01305\ \textcolor{comment}{//\ vertex.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01306}01306\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01307}01307\ \ \ \textcolor{keywordflow}{for}\ (uint32\_t\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ =\ 0;\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ <\ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a5f9422d4f1f9df2f301cbd578e29ae7b}{GetLSA}}\ ()-\/>GetNLinkRecords\ ();\ ++\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}})}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01308}01308\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01309}01309\ \ \ \ \ \ \ l\ =\ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a5f9422d4f1f9df2f301cbd578e29ae7b}{GetLSA}}\ ()-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_acb5df9fec863df510911aa3e64d4aa04}{GetLinkRecord}}\ (\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01310}01310\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01311}01311\ \textcolor{comment}{//\ The\ link\ ID\ of\ a\ link\ record\ representing\ a\ point-\/to-\/point\ link\ is\ set\ to}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01312}01312\ \textcolor{comment}{//\ the\ router\ ID\ of\ the\ neighboring\ router\ -\/-\/\ the\ router\ to\ which\ the\ link}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01313}01313\ \textcolor{comment}{//\ connects\ from\ the\ perspective\ of\ <v>\ in\ this\ case.\ \ The\ vertex\ ID\ is\ also}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01314}01314\ \textcolor{comment}{//\ set\ to\ the\ router\ ID\ (using\ the\ link\ state\ advertisement\ of\ a\ router\ node).}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01315}01315\ \textcolor{comment}{//\ We're\ just\ checking\ to\ see\ if\ the\ link\ <l>\ is\ actually\ the\ link\ from\ <v>\ to}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01316}01316\ \textcolor{comment}{//\ <w>.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01317}01317\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01318}01318\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (l-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_a9fe6e135674ef321bc11b48f90071857}{GetLinkId}}\ ()\ ==\ w-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a83acd923d19102c507faadb2f4e68f56}{GetVertexId}}\ ())\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01319}01319\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01320}01320\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!found\_prev\_link)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01321}01321\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01322}01322\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Skipping\ links\ before\ prev\_link\ found"{}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01323}01323\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ found\_prev\_link\ =\ \textcolor{keyword}{true};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01324}01324\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01325}01325\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01326}01326\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01327}01327\ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Found\ matching\ link\ l:\ \ linkId\ =\ "{}}\ <<}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01328}01328\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ l-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_a9fe6e135674ef321bc11b48f90071857}{GetLinkId}}\ ()\ <<\ \textcolor{stringliteral}{"{}\ linkData\ =\ "{}}\ <<\ l-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_a97080a8409f77898f4485230be0be5e4}{GetLinkData}}\ ());}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01329}01329\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01330}01330\ \textcolor{comment}{//\ If\ skip\ is\ false,\ don't\ (not\ too\ surprisingly)\ skip\ the\ link\ found\ -\/-\/\ it's\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01331}01331\ \textcolor{comment}{//\ the\ one\ we're\ interested\ in.\ \ That's\ either\ because\ we\ didn't\ pass\ in\ a\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01332}01332\ \textcolor{comment}{//\ previous\ link,\ and\ we're\ interested\ in\ the\ first\ one,\ or\ because\ we've\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01333}01333\ \textcolor{comment}{//\ skipped\ a\ previous\ link\ and\ moved\ forward\ to\ the\ next\ (which\ is\ then\ the}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01334}01334\ \textcolor{comment}{//\ one\ we\ want).}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01335}01335\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01336}01336\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (skip\ ==\ \textcolor{keyword}{false})}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01337}01337\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01338}01338\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Returning\ the\ found\ link"{}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01339}01339\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ l;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01340}01340\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01341}01341\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01342}01342\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01343}01343\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01344}01344\ \textcolor{comment}{//\ Skip\ is\ true\ and\ we've\ found\ a\ link\ from\ <v>\ to\ <w>.\ \ We\ want\ the\ next\ one.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01345}01345\ \textcolor{comment}{//\ Setting\ skip\ to\ false\ gets\ us\ the\ next\ point-\/to-\/point\ global\ router\ link}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01346}01346\ \textcolor{comment}{//\ record\ in\ the\ LSA\ from\ <v>.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01347}01347\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01348}01348\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Skipping\ the\ found\ link"{}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01349}01349\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ skip\ =\ \textcolor{keyword}{false};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01350}01350\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01351}01351\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01352}01352\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01353}01353\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01354}01354\ \ \ \textcolor{keywordflow}{return}\ 0;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01355}01355\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01356}01356\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01357}01357\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01358}01358\ \textcolor{comment}{//\ Used\ for\ unit\ tests.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01359}01359\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01360}01360\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01361}\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a14aed0c12cb59dcdc7eaaf14c8b54ea4}{01361}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a14aed0c12cb59dcdc7eaaf14c8b54ea4}{DGRRouteManagerImpl::DebugSPFCalculate}}\ (Ipv4Address\ root)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01362}01362\ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01363}01363\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ root);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01364}01364\ \ \ \textcolor{comment}{//\ SPFCalculate\ (root,\ 1,\ 1);}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01365}01365\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01366}01366\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01367}01367\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01368}01368\ \textcolor{comment}{//\ Used\ to\ test\ if\ a\ node\ is\ a\ stub,\ from\ an\ OSPF\ sense.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01369}01369\ \textcolor{comment}{//\ If\ there\ is\ only\ one\ link\ of\ type\ 1\ or\ 2,\ then\ a\ default\ route}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01370}01370\ \textcolor{comment}{//\ can\ safely\ be\ added\ to\ the\ next-\/hop\ router\ and\ SPF\ does\ not\ need}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01371}01371\ \textcolor{comment}{//\ to\ be\ run}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01372}01372\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01373}01373\ \textcolor{keywordtype}{bool}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01374}\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a1f608c8ac5a62f915208141c2d7bea22}{01374}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a1f608c8ac5a62f915208141c2d7bea22}{DGRRouteManagerImpl::CheckForStubNode}}\ (Ipv4Address\ root)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01375}01375\ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01376}01376\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ root);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01377}01377\ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a}{DGRRoutingLSA}}\ *rlsa\ =\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a466e6a4182a792e33610a1a1e7a6b990}{m\_lsdb}}-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_l_s_d_b_a232013c41890eb75496e0201fd0689d2}{GetLSA}}\ (root);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01378}01378\ \ \ Ipv4Address\ myRouterId\ =\ rlsa-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a0ec746b926044a548e4f3a09309322ce}{GetLinkStateId}}\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01379}01379\ \ \ \textcolor{keywordtype}{int}\ transits\ =\ 0;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01380}01380\ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record}{DGRRoutingLinkRecord}}\ *transitLink\ =\ 0;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01381}01381\ \ \ \textcolor{keywordflow}{for}\ (uint32\_t\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ =\ 0;\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ <\ rlsa-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a882a042d18bcbdea3bc1a3eb55dcfe58}{GetNLinkRecords}}\ ();\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}++)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01382}01382\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01383}01383\ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record}{DGRRoutingLinkRecord}}\ *l\ =\ rlsa-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_acb5df9fec863df510911aa3e64d4aa04}{GetLinkRecord}}\ (\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01384}01384\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (l-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_ab9148eaf7a9d088a397e66164c1f30b9}{GetLinkType}}\ ()\ ==\ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_a93b89b9f89407a39712186911ad12a4baa0b0a272a289d2f1fcafdfedcde669b7}{DGRRoutingLinkRecord::TransitNetwork}})}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01385}01385\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01386}01386\ \ \ \ \ \ \ \ \ \ \ transits++;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01387}01387\ \ \ \ \ \ \ \ \ \ \ transitLink\ =\ l;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01388}01388\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01389}01389\ \ \ \ \ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (l-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_ab9148eaf7a9d088a397e66164c1f30b9}{GetLinkType}}\ ()\ ==\ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_a93b89b9f89407a39712186911ad12a4bac9c0a2d3da9eb9fdafee93e52a498c84}{DGRRoutingLinkRecord::PointToPoint}})}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01390}01390\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01391}01391\ \ \ \ \ \ \ \ \ \ \ transits++;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01392}01392\ \ \ \ \ \ \ \ \ \ \ transitLink\ =\ l;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01393}01393\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01394}01394\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01395}01395\ \ \ \textcolor{keywordflow}{if}\ (transits\ ==\ 0)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01396}01396\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01397}01397\ \ \ \ \ \ \ \textcolor{comment}{//\ This\ router\ is\ not\ connected\ to\ any\ router.\ \ Probably,\ global}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01398}01398\ \ \ \ \ \ \ \textcolor{comment}{//\ routing\ should\ not\ be\ called\ for\ this\ node,\ but\ we\ can\ just\ raise}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01399}01399\ \ \ \ \ \ \ \textcolor{comment}{//\ a\ warning\ here\ and\ return\ true.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01400}01400\ \ \ \ \ \ \ NS\_LOG\_WARN\ (\textcolor{stringliteral}{"{}all\ nodes\ should\ have\ at\ least\ one\ transit\ link:"{}}\ <<\ root\ );}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01401}01401\ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{true};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01402}01402\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01403}01403\ \ \ \textcolor{keywordflow}{if}\ (transits\ ==\ 1)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01404}01404\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01405}01405\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (transitLink-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_ab9148eaf7a9d088a397e66164c1f30b9}{GetLinkType}}\ ()\ ==\ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_a93b89b9f89407a39712186911ad12a4baa0b0a272a289d2f1fcafdfedcde669b7}{DGRRoutingLinkRecord::TransitNetwork}})}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01406}01406\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01407}01407\ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Install\ default\ route\ to\ next\ hop\ router}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01408}01408\ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ What\ is\ the\ next\ hop?\ \ We\ need\ to\ check\ all\ neighbors\ on\ the\ link.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01409}01409\ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ If\ there\ is\ a\ single\ router\ that\ has\ two\ transit\ links,\ then}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01410}01410\ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ that\ is\ the\ default\ next\ hop.\ \ If\ there\ are\ more\ than\ one}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01411}01411\ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ routers\ on\ link\ with\ multiple\ transit\ links,\ return\ false.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01412}01412\ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Not\ yet\ implemented,\ so\ simply\ return\ false}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01413}01413\ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}TBD:\ Would\ have\ inserted\ default\ for\ transit"{}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01414}01414\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{false};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01415}01415\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01416}01416\ \ \ \ \ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (transitLink-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_ab9148eaf7a9d088a397e66164c1f30b9}{GetLinkType}}\ ()\ ==\ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_a93b89b9f89407a39712186911ad12a4bac9c0a2d3da9eb9fdafee93e52a498c84}{DGRRoutingLinkRecord::PointToPoint}})}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01417}01417\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01418}01418\ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Install\ default\ route\ to\ next\ hop}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01419}01419\ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ The\ link\ record\ LinkID\ is\ the\ router\ ID\ of\ the\ peer.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01420}01420\ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ The\ Link\ Data\ is\ the\ local\ IP\ interface\ address}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01421}01421\ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a}{DGRRoutingLSA}}\ *w\_lsa\ =\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a466e6a4182a792e33610a1a1e7a6b990}{m\_lsdb}}-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_l_s_d_b_a232013c41890eb75496e0201fd0689d2}{GetLSA}}\ (transitLink-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_a9fe6e135674ef321bc11b48f90071857}{GetLinkId}}\ ());}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01422}01422\ \ \ \ \ \ \ \ \ \ \ uint32\_t\ nLinkRecords\ =\ w\_lsa-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a882a042d18bcbdea3bc1a3eb55dcfe58}{GetNLinkRecords}}\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01423}01423\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (uint32\_t\ j\ =\ 0;\ j\ <\ nLinkRecords;\ ++j)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01424}01424\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01425}01425\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01426}01426\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ We\ are\ only\ concerned\ about\ point-\/to-\/point\ links}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01427}01427\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01428}01428\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record}{DGRRoutingLinkRecord}}\ *lr\ =\ w\_lsa-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_acb5df9fec863df510911aa3e64d4aa04}{GetLinkRecord}}\ (j);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01429}01429\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (lr-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_ab9148eaf7a9d088a397e66164c1f30b9}{GetLinkType}}\ ()\ !=\ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_a93b89b9f89407a39712186911ad12a4bac9c0a2d3da9eb9fdafee93e52a498c84}{DGRRoutingLinkRecord::PointToPoint}})}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01430}01430\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01431}01431\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01432}01432\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01433}01433\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Find\ the\ link\ record\ that\ corresponds\ to\ our\ routerId}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01434}01434\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (lr-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_a9fe6e135674ef321bc11b48f90071857}{GetLinkId}}\ ()\ ==\ myRouterId)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01435}01435\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01436}01436\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Next\ hop\ is\ stored\ in\ the\ LinkID\ field\ of\ lr}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01437}01437\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Ptr<DGRRouter>\ router\ =\ rlsa-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a5000c59488a04e9b809574c93624d3ce}{GetNode}}\ ()-\/>GetObject<\mbox{\hyperlink{classns3_1_1_d_g_r_router}{DGRRouter}}>\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01438}01438\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NS\_ASSERT\ (router);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01439}01439\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Ptr<Ipv4DGRRouting>\ gr\ =\ router-\/>GetRoutingProtocol\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01440}01440\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NS\_ASSERT\ (gr);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01441}01441\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ gr-\/>AddNetworkRouteTo\ (Ipv4Address\ (\textcolor{stringliteral}{"{}0.0.0.0"{}}),\ Ipv4Mask\ (\textcolor{stringliteral}{"{}0.0.0.0"{}}),\ lr-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_a97080a8409f77898f4485230be0be5e4}{GetLinkData}}\ (),\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01442}01442\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a017c230a5a38bc81243ebf39e94bd36b}{FindOutgoingInterfaceId}}\ (transitLink-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_a97080a8409f77898f4485230be0be5e4}{GetLinkData}}\ ()));}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01443}01443\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Inserting\ default\ route\ for\ node\ "{}}\ <<\ myRouterId\ <<\ \textcolor{stringliteral}{"{}\ to\ next\ hop\ "{}}\ <<\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01444}01444\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ lr-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_a97080a8409f77898f4485230be0be5e4}{GetLinkData}}\ ()\ <<\ \textcolor{stringliteral}{"{}\ via\ interface\ "{}}\ <<\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01445}01445\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a017c230a5a38bc81243ebf39e94bd36b}{FindOutgoingInterfaceId}}\ (transitLink-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_a97080a8409f77898f4485230be0be5e4}{GetLinkData}}\ ()));}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01446}01446\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{true};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01447}01447\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01448}01448\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01449}01449\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01450}01450\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01451}01451\ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{false};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01452}01452\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01453}01453\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01454}01454\ \textcolor{comment}{//\ quagga\ ospf\_spf\_calculate}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01455}01455\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01456}\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a910c2efcc40a79d4c062eb08ceb11522}{01456}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a910c2efcc40a79d4c062eb08ceb11522}{DGRRouteManagerImpl::SPFCalculate}}\ (Ipv4Address\ root,\ Ipv4Address\ initroot,\ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record}{DGRRoutingLinkRecord}}*\ l,\ uint32\_t\ Iface)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01457}01457\ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01458}01458\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ root);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01459}01459\ \ \ \textcolor{comment}{//\ std::cout\ <<\ "{}The\ interface\ =\ "{}\ <<\ Iface\ <<\ std::endl;}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01460}01460\ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex}{DGRVertex}}\ *v;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01461}01461\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01462}01462\ \textcolor{comment}{//\ Initialize\ the\ Link\ State\ Database.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01463}01463\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01464}01464\ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a466e6a4182a792e33610a1a1e7a6b990}{m\_lsdb}}-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_l_s_d_b_a4cc94fab7e7699bd3b73e3e1bd874875}{Initialize}}\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01465}01465\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01466}01466\ \textcolor{comment}{//\ The\ candidate\ queue\ is\ a\ priority\ queue\ of\ DGRVertex\ objects,\ with\ the\ top}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01467}01467\ \textcolor{comment}{//\ of\ the\ queue\ being\ the\ closest\ vertex\ in\ terms\ of\ distance\ from\ the\ root}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01468}01468\ \textcolor{comment}{//\ of\ the\ tree.\ \ Initially,\ this\ queue\ is\ empty.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01469}01469\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01470}01470\ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_candidate_queue}{DGRCandidateQueue}}\ candidate;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01471}01471\ \ \ NS\_ASSERT\ (candidate.\mbox{\hyperlink{classns3_1_1_d_g_r_candidate_queue_abdb46ac92a797d66c0a08f646f6637f5}{Size}}\ ()\ ==\ 0);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01472}01472\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01473}01473\ \textcolor{comment}{//\ Initialize\ the\ shortest-\/path\ tree\ to\ only\ contain\ the\ router\ doing\ the\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01474}01474\ \textcolor{comment}{//\ calculation.\ \ Each\ router\ (and\ corresponding\ network)\ is\ a\ vertex\ in\ the}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01475}01475\ \textcolor{comment}{//\ shortest\ path\ first\ (SPF)\ tree.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01476}01476\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01477}01477\ \ \ v\ =\ \textcolor{keyword}{new}\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex}{DGRVertex}}\ (\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a466e6a4182a792e33610a1a1e7a6b990}{m\_lsdb}}-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_l_s_d_b_a232013c41890eb75496e0201fd0689d2}{GetLSA}}\ (root));}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01478}01478\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01483}01483\ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex}{DGRVertex}}\ *v\_init;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01484}01484\ \ \ v\_init\ =\ \textcolor{keyword}{new}\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex}{DGRVertex}}\ (\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a466e6a4182a792e33610a1a1e7a6b990}{m\_lsdb}}-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_l_s_d_b_a232013c41890eb75496e0201fd0689d2}{GetLSA}}\ (initroot));}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01485}01485\ \ \ v\_init-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a5f9422d4f1f9df2f301cbd578e29ae7b}{GetLSA}}\ ()-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a497453d1271c0020968487ec8ead99c5}{SetStatus}}\ (\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a2d6cf227cde572e9c99d273a0e0fa5f7a0f88fe6c9e38275dc638a9ebb26018a2}{DGRRoutingLSA::LSA\_SPF\_IN\_SPFTREE}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01486}01486\ \textcolor{comment}{//\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01487}01487\ \textcolor{comment}{//\ This\ vertex\ is\ the\ root\ of\ the\ SPF\ tree\ and\ it\ is\ distance\ 0\ from\ the\ root.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01488}01488\ \textcolor{comment}{//\ We\ also\ mark\ this\ vertex\ as\ being\ in\ the\ SPF\ tree.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01489}01489\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01490}01490\ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a51238c1122fc794564a658bf852d6910}{m\_spfroot}}=\ v;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01491}01491\ \ \ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a4b5aa6f4683f8736530d15c60f2538a5}{SetDistanceFromRoot}}\ (l-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_af96cb9a05b3d95d14b6af29e058e3712}{GetMetric}}\ ());}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01492}01492\ \ \ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a5f9422d4f1f9df2f301cbd578e29ae7b}{GetLSA}}\ ()-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a497453d1271c0020968487ec8ead99c5}{SetStatus}}\ (\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a2d6cf227cde572e9c99d273a0e0fa5f7a0f88fe6c9e38275dc638a9ebb26018a2}{DGRRoutingLSA::LSA\_SPF\_IN\_SPFTREE}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01493}01493\ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Starting\ SPFCalculate\ for\ node\ "{}}\ <<\ root);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01494}01494\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01495}01495\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01496}01496\ \textcolor{comment}{//\ Optimize\ SPF\ calculation,\ for\ ns-\/3.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01497}01497\ \textcolor{comment}{//\ We\ do\ not\ need\ to\ calculate\ SPF\ for\ every\ node\ in\ the\ network\ if\ this}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01498}01498\ \textcolor{comment}{//\ node\ has\ only\ one\ interface\ through\ which\ another\ router\ can\ be\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01499}01499\ \textcolor{comment}{//\ reached.\ \ Instead,\ short-\/circuit\ this\ computation\ and\ just\ install}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01500}01500\ \textcolor{comment}{//\ a\ default\ route\ in\ the\ CheckForStubNode()\ method.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01501}01501\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01502}01502\ \ \ \textcolor{keywordflow}{if}\ (NodeList::GetNNodes\ ()\ >\ 0\ \&\&\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a1f608c8ac5a62f915208141c2d7bea22}{CheckForStubNode}}\ (root))}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01503}01503\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01504}01504\ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}SPFCalculate\ truncated\ for\ stub\ node\ "{}}\ <<\ root);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01505}01505\ \ \ \ \ \ \ \textcolor{keyword}{delete}\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a51238c1122fc794564a658bf852d6910}{m\_spfroot}};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01506}01506\ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01507}01507\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01508}01508\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01509}01509\ \ \ \textcolor{keywordflow}{for}\ (;;)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01510}01510\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01511}01511\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01512}01512\ \textcolor{comment}{//\ The\ operations\ we\ need\ to\ do\ are\ given\ in\ the\ OSPF\ RFC\ which\ we\ reference}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01513}01513\ \textcolor{comment}{//\ as\ we\ go\ along.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01514}01514\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01515}01515\ \textcolor{comment}{//\ RFC2328\ 16.1.\ (2).\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01516}01516\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01517}01517\ \textcolor{comment}{//\ We\ examine\ the\ Global\ Router\ Link\ Records\ in\ the\ Link\ State\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01518}01518\ \textcolor{comment}{//\ Advertisements\ of\ the\ current\ vertex.\ \ If\ there\ are\ any\ point-\/to-\/point}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01519}01519\ \textcolor{comment}{//\ links\ to\ unexplored\ adjacent\ vertices\ we\ add\ them\ to\ the\ tree\ and\ update}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01520}01520\ \textcolor{comment}{//\ the\ distance\ and\ next\ hop\ information\ on\ how\ to\ get\ there.\ \ We\ also\ add}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01521}01521\ \textcolor{comment}{//\ the\ new\ vertices\ to\ the\ candidate\ queue\ (the\ priority\ queue\ ordered\ by}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01522}01522\ \textcolor{comment}{//\ shortest\ path).\ \ If\ the\ new\ vertices\ represent\ shorter\ paths,\ we\ use\ them}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01523}01523\ \textcolor{comment}{//\ and\ update\ the\ path\ cost.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01524}01524\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01525}01525\ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_ab573904f9f357e2b802b1bbdcdc3247d}{SPFNext}}\ (v,\ candidate);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01526}01526\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01527}01527\ \textcolor{comment}{//\ RFC2328\ 16.1.\ (3).\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01528}01528\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01529}01529\ \textcolor{comment}{//\ If\ at\ this\ step\ the\ candidate\ list\ is\ empty,\ the\ shortest-\/path\ tree\ (of}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01530}01530\ \textcolor{comment}{//\ transit\ vertices)\ has\ been\ completely\ built\ and\ this\ stage\ of\ the}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01531}01531\ \textcolor{comment}{//\ procedure\ terminates.\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01532}01532\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01533}01533\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (candidate.\mbox{\hyperlink{classns3_1_1_d_g_r_candidate_queue_abdb46ac92a797d66c0a08f646f6637f5}{Size}}\ ()\ ==\ 0)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01534}01534\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01535}01535\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01536}01536\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01537}01537\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01538}01538\ \textcolor{comment}{//\ Choose\ the\ vertex\ belonging\ to\ the\ candidate\ list\ that\ is\ closest\ to\ the}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01539}01539\ \textcolor{comment}{//\ root,\ and\ add\ it\ to\ the\ shortest-\/path\ tree\ (removing\ it\ from\ the\ candidate}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01540}01540\ \textcolor{comment}{//\ list\ in\ the\ process).}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01541}01541\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01542}01542\ \textcolor{comment}{//\ Recall\ that\ in\ the\ previous\ step,\ we\ created\ DGRVertex\ structures\ for\ each}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01543}01543\ \textcolor{comment}{//\ of\ the\ routers\ found\ in\ the\ Global\ Router\ Link\ Records\ and\ added\ tehm\ to\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01544}01544\ \textcolor{comment}{//\ the\ candidate\ list.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01545}01545\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01546}01546\ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (candidate);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01547}01547\ \ \ \ \ \ \ v\ =\ candidate.\mbox{\hyperlink{classns3_1_1_d_g_r_candidate_queue_a278c16f4c6de3e85aa9268215a6e95db}{Pop}}\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01548}01548\ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Popped\ vertex\ "{}}\ <<\ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a83acd923d19102c507faadb2f4e68f56}{GetVertexId}}\ ());}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01549}01549\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01550}01550\ \textcolor{comment}{//\ Update\ the\ status\ field\ of\ the\ vertex\ to\ indicate\ that\ it\ is\ in\ the\ SPF}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01551}01551\ \textcolor{comment}{//\ tree.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01552}01552\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01553}01553\ \ \ \ \ \ \ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a5f9422d4f1f9df2f301cbd578e29ae7b}{GetLSA}}\ ()-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a497453d1271c0020968487ec8ead99c5}{SetStatus}}\ (\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a2d6cf227cde572e9c99d273a0e0fa5f7a0f88fe6c9e38275dc638a9ebb26018a2}{DGRRoutingLSA::LSA\_SPF\_IN\_SPFTREE}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01554}01554\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01555}01555\ \textcolor{comment}{//\ The\ current\ vertex\ has\ a\ parent\ pointer.\ \ By\ calling\ this\ rather\ oddly\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01556}01556\ \textcolor{comment}{//\ named\ method\ (blame\ quagga)\ we\ add\ the\ current\ vertex\ to\ the\ list\ of\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01557}01557\ \textcolor{comment}{//\ children\ of\ that\ parent\ vertex.\ \ In\ the\ next\ hop\ calculation\ called\ during}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01558}01558\ \textcolor{comment}{//\ SPFNext,\ the\ parent\ pointer\ was\ set\ but\ the\ vertex\ has\ been\ orphaned\ up}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01559}01559\ \textcolor{comment}{//\ to\ now.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01560}01560\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01561}01561\ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a98dcc2494c9f368e4cfed15ead8a2990}{DGRVertexAddParent}}\ (v);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01562}01562\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01563}01563\ \textcolor{comment}{//\ Note\ that\ when\ there\ is\ a\ choice\ of\ vertices\ closest\ to\ the\ root,\ network}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01564}01564\ \textcolor{comment}{//\ vertices\ must\ be\ chosen\ before\ router\ vertices\ in\ order\ to\ necessarily}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01565}01565\ \textcolor{comment}{//\ find\ all\ equal-\/cost\ paths.\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01566}01566\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01567}01567\ \textcolor{comment}{//\ RFC2328\ 16.1.\ (4).\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01568}01568\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01569}01569\ \textcolor{comment}{//\ This\ is\ the\ method\ that\ actually\ adds\ the\ routes.\ \ It'll\ walk\ the\ list}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01570}01570\ \textcolor{comment}{//\ of\ nodes\ in\ the\ system,\ looking\ for\ the\ node\ corresponding\ to\ the\ router}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01571}01571\ \textcolor{comment}{//\ ID\ of\ the\ root\ of\ the\ tree\ -\/-\/\ that\ is\ the\ router\ we're\ building\ the\ routes}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01572}01572\ \textcolor{comment}{//\ for.\ \ It\ looks\ for\ the\ Ipv4\ interface\ of\ that\ node\ and\ remembers\ it.\ \ So}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01573}01573\ \textcolor{comment}{//\ we\ are\ only\ actually\ adding\ routes\ to\ that\ one\ node\ at\ the\ root\ of\ the\ SPF\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01574}01574\ \textcolor{comment}{//\ tree.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01575}01575\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01576}01576\ \textcolor{comment}{//\ We're\ going\ to\ pop\ of\ a\ pointer\ to\ every\ vertex\ in\ the\ tree\ except\ the\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01577}01577\ \textcolor{comment}{//\ root\ in\ order\ of\ distance\ from\ the\ root.\ \ For\ each\ of\ the\ vertices,\ we\ call}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01578}01578\ \textcolor{comment}{//\ SPFIntraAddRouter\ ().\ \ Down\ in\ SPFIntraAddRouter,\ we\ look\ at\ all\ of\ the\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01579}01579\ \textcolor{comment}{//\ point-\/to-\/point\ Global\ Router\ Link\ Records\ (the\ links\ to\ nodes\ adjacent\ to}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01580}01580\ \textcolor{comment}{//\ the\ node\ represented\ by\ the\ vertex).\ \ We\ add\ a\ route\ to\ the\ IP\ address\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01581}01581\ \textcolor{comment}{//\ specified\ by\ the\ m\_linkData\ field\ of\ each\ of\ those\ link\ records.\ \ This\ will}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01582}01582\ \textcolor{comment}{//\ be\ the\ *local*\ IP\ address\ associated\ with\ the\ interface\ attached\ to\ the\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01583}01583\ \textcolor{comment}{//\ link.\ \ We\ use\ the\ outbound\ interface\ and\ next\ hop\ information\ present\ in\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01584}01584\ \textcolor{comment}{//\ the\ vertex\ <v>\ which\ have\ possibly\ been\ inherited\ from\ the\ root.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01585}01585\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01586}01586\ \textcolor{comment}{//\ To\ summarize,\ we're\ going\ to\ look\ at\ the\ node\ represented\ by\ <v>\ and\ loop}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01587}01587\ \textcolor{comment}{//\ through\ its\ point-\/to-\/point\ links,\ adding\ a\ *host*\ route\ to\ the\ local\ IP}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01588}01588\ \textcolor{comment}{//\ address\ (at\ the\ <v>\ side)\ for\ each\ of\ those\ links.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01589}01589\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01590}01590\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a5999846daefbeb25a5265e80e3f3a078}{GetVertexType}}\ ()\ ==\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a4e2ae872c20a6e44e2c53087a4e96ccea0d137433dfa77b24862a5f2c116da286}{DGRVertex::VertexRouter}})}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01591}01591\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01592}01592\ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a58756bc6216f5ebe1941a2102ae4cdf9}{SPFIntraAddRouter}}\ (v,\ v\_init,\ l-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_a97080a8409f77898f4485230be0be5e4}{GetLinkData}}\ (),\ Iface);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01593}01593\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01594}01594\ \ \ \ \ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a5999846daefbeb25a5265e80e3f3a078}{GetVertexType}}\ ()\ ==\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a4e2ae872c20a6e44e2c53087a4e96ccea4cb6ddc9d2395166b87840984bc01880}{DGRVertex::VertexNetwork}})}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01595}01595\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01596}01596\ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a80ce56eb81842ac31afccfdd698d1d73}{SPFIntraAddTransit}}\ (v);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01597}01597\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01598}01598\ \ \ \ \ \ \ \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01599}01599\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01600}01600\ \ \ \ \ \ \ \ \ \ \ NS\_ASSERT\_MSG\ (0,\ \textcolor{stringliteral}{"{}illegal\ DGRVertex\ type"{}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01601}01601\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01602}01602\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01603}01603\ \textcolor{comment}{//\ RFC2328\ 16.1.\ (5).\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01604}01604\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01605}01605\ \textcolor{comment}{//\ Iterate\ the\ algorithm\ by\ returning\ to\ Step\ 2\ until\ there\ are\ no\ more}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01606}01606\ \textcolor{comment}{//\ candidate\ vertices.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01607}01607\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01608}01608\ \ \ \ \ \}\ \ \textcolor{comment}{//\ end\ for\ loop}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01609}01609\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01610}01610\ \textcolor{comment}{//\ Second\ stage\ of\ SPF\ calculation\ procedure}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01611}01611\ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a71dd2f4c78a96ecb7d86dd75fd6f78bd}{SPFProcessStubs}}\ (\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a51238c1122fc794564a658bf852d6910}{m\_spfroot}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01612}01612\ \ \ \textcolor{keywordflow}{for}\ (uint32\_t\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ =\ 0;\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ <\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a466e6a4182a792e33610a1a1e7a6b990}{m\_lsdb}}-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_l_s_d_b_a5ceebeea8595e2788e490c2e56cc3405}{GetNumExtLSAs}}\ ();\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}++)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01613}01613\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01614}01614\ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a51238c1122fc794564a658bf852d6910}{m\_spfroot}}-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_adedcbcf4b3fd8a7db8a086d5beefc1d2}{ClearVertexProcessed}}\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01615}01615\ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a}{DGRRoutingLSA}}\ *extlsa\ =\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a466e6a4182a792e33610a1a1e7a6b990}{m\_lsdb}}-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_l_s_d_b_a4eccf46bb836fc866adeb57b38d6a493}{GetExtLSA}}\ (\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01616}01616\ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Processing\ External\ LSA\ with\ id\ "{}}\ <<\ extlsa-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a0ec746b926044a548e4f3a09309322ce}{GetLinkStateId}}\ ());}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01617}01617\ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_ad51d5dbbd85120ad79227351fc16c9f4}{ProcessASExternals}}\ (\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a51238c1122fc794564a658bf852d6910}{m\_spfroot}},\ extlsa);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01618}01618\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01619}01619\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01620}01620\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01621}01621\ \textcolor{comment}{//\ We're\ all\ done\ setting\ the\ routing\ information\ for\ the\ node\ at\ the\ root\ of}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01622}01622\ \textcolor{comment}{//\ the\ SPF\ tree.\ \ Delete\ all\ of\ the\ vertices\ and\ corresponding\ resources.\ \ Go}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01623}01623\ \textcolor{comment}{//\ possibly\ do\ it\ again\ for\ the\ next\ router.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01624}01624\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01625}01625\ \ \ \textcolor{keyword}{delete}\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a51238c1122fc794564a658bf852d6910}{m\_spfroot}};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01626}01626\ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a51238c1122fc794564a658bf852d6910}{m\_spfroot}}\ =\ 0;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01627}01627\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01628}01628\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01629}01629\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01630}\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_ad51d5dbbd85120ad79227351fc16c9f4}{01630}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_ad51d5dbbd85120ad79227351fc16c9f4}{DGRRouteManagerImpl::ProcessASExternals}}\ (\mbox{\hyperlink{classns3_1_1_d_g_r_vertex}{DGRVertex}}*\ v,\ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a}{DGRRoutingLSA}}*\ extlsa)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01631}01631\ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01632}01632\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ v\ <<\ extlsa);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01633}01633\ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Processing\ external\ for\ destination\ "{}}\ <<\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01634}01634\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ extlsa-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a0ec746b926044a548e4f3a09309322ce}{GetLinkStateId}}\ ()\ <<}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01635}01635\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{},\ for\ router\ "{}}\ \ <<\ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a83acd923d19102c507faadb2f4e68f56}{GetVertexId}}\ ()\ <<}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01636}01636\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{},\ advertised\ by\ "{}}\ <<\ extlsa-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_aa16092b325a84e50b90fcc5dd4e5bab2}{GetAdvertisingRouter}}\ ());}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01637}01637\ \ \ \textcolor{keywordflow}{if}\ (v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a5999846daefbeb25a5265e80e3f3a078}{GetVertexType}}\ ()\ ==\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a4e2ae872c20a6e44e2c53087a4e96ccea0d137433dfa77b24862a5f2c116da286}{DGRVertex::VertexRouter}})}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01638}01638\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01639}01639\ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a}{DGRRoutingLSA}}\ *rlsa\ =\ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a5f9422d4f1f9df2f301cbd578e29ae7b}{GetLSA}}\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01640}01640\ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Processing\ router\ LSA\ with\ id\ "{}}\ <<\ rlsa-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a0ec746b926044a548e4f3a09309322ce}{GetLinkStateId}}\ ());}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01641}01641\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ ((rlsa-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a0ec746b926044a548e4f3a09309322ce}{GetLinkStateId}}\ ())\ ==\ (extlsa-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_aa16092b325a84e50b90fcc5dd4e5bab2}{GetAdvertisingRouter}}\ ()))}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01642}01642\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01643}01643\ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Found\ advertising\ router\ to\ destination"{}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01644}01644\ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a4169b90db3aa5437191ecf42e484f567}{SPFAddASExternal}}\ (extlsa,v);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01645}01645\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01646}01646\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01647}01647\ \ \ \textcolor{keywordflow}{for}\ (uint32\_t\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ =\ 0;\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ <\ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a504717b90b3fad088d133c2e71836eaf}{GetNChildren}}\ ();\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}++)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01648}01648\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01649}01649\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_aea98bf4a660837344a4c802546249a21}{GetChild}}\ (\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}})-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a6afcdedc8616fc035f8c9736d5679cd4}{IsVertexProcessed}}\ ())}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01650}01650\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01651}01651\ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Vertex's\ child\ "{}}\ <<\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ <<\ \textcolor{stringliteral}{"{}\ not\ yet\ processed,\ processing..."{}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01652}01652\ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_ad51d5dbbd85120ad79227351fc16c9f4}{ProcessASExternals}}\ (v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_aea98bf4a660837344a4c802546249a21}{GetChild}}\ (\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}),\ extlsa);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01653}01653\ \ \ \ \ \ \ \ \ \ \ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_aea98bf4a660837344a4c802546249a21}{GetChild}}\ (\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}})-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_aa1718a99ec16d3ebf25949e3edac9168}{SetVertexProcessed}}\ (\textcolor{keyword}{true});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01654}01654\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01655}01655\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01656}01656\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01657}01657\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01658}01658\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01659}01659\ \textcolor{comment}{//\ Adding\ external\ routes\ to\ routing\ table\ -\/\ modeled\ after}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01660}01660\ \textcolor{comment}{//\ SPFAddIntraAddStub()}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01661}01661\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01662}01662\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01663}01663\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01664}\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a4169b90db3aa5437191ecf42e484f567}{01664}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a4169b90db3aa5437191ecf42e484f567}{DGRRouteManagerImpl::SPFAddASExternal}}\ (\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a}{DGRRoutingLSA}}\ *extlsa,\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex}{DGRVertex}}\ *v)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01665}01665\ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01666}01666\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ extlsa\ <<\ v);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01667}01667\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01668}01668\ \ \ NS\_ASSERT\_MSG\ (\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a51238c1122fc794564a658bf852d6910}{m\_spfroot}},\ \textcolor{stringliteral}{"{}DGRRouteManagerImpl::SPFAddASExternal\ ():\ Root\ pointer\ not\ set"{}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01669}01669\ \textcolor{comment}{//\ Two\ cases\ to\ consider:\ We\ are\ advertising\ the\ external\ ourselves}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01670}01670\ \textcolor{comment}{//\ =>\ No\ need\ to\ add\ anything}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01671}01671\ \textcolor{comment}{//\ OR\ find\ best\ path\ to\ the\ advertising\ router}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01672}01672\ \ \ \textcolor{keywordflow}{if}\ (v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a83acd923d19102c507faadb2f4e68f56}{GetVertexId}}\ ()\ ==\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a51238c1122fc794564a658bf852d6910}{m\_spfroot}}-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a83acd923d19102c507faadb2f4e68f56}{GetVertexId}}\ ())}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01673}01673\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01674}01674\ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}External\ is\ on\ local\ host:\ "{}}\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01675}01675\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ <<\ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a83acd923d19102c507faadb2f4e68f56}{GetVertexId}}\ ()\ <<\ \textcolor{stringliteral}{"{};\ returning"{}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01676}01676\ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01677}01677\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01678}01678\ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}External\ is\ on\ remote\ host:\ "{}}\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01679}01679\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ <<\ extlsa-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_aa16092b325a84e50b90fcc5dd4e5bab2}{GetAdvertisingRouter}}\ ()\ <<\ \textcolor{stringliteral}{"{};\ installing"{}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01680}01680\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01681}01681\ \ \ Ipv4Address\ routerId\ =\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a51238c1122fc794564a658bf852d6910}{m\_spfroot}}-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a83acd923d19102c507faadb2f4e68f56}{GetVertexId}}\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01682}01682\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01683}01683\ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Vertex\ ID\ =\ "{}}\ <<\ routerId);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01684}01684\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01685}01685\ \textcolor{comment}{//\ We\ need\ to\ walk\ the\ list\ of\ nodes\ looking\ for\ the\ one\ that\ has\ the\ router}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01686}01686\ \textcolor{comment}{//\ ID\ corresponding\ to\ the\ root\ vertex.\ \ This\ is\ the\ one\ we're\ going\ to\ write}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01687}01687\ \textcolor{comment}{//\ the\ routing\ information\ to.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01688}01688\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01689}01689\ \ \ NodeList::Iterator\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ =\ NodeList::Begin\ ();\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01690}01690\ \ \ NodeList::Iterator\ listEnd\ =\ NodeList::End\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01691}01691\ \ \ \textcolor{keywordflow}{for}\ (;\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ !=\ listEnd;\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}++)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01692}01692\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01693}01693\ \ \ \ \ \ \ Ptr<Node>\ node\ =\ *\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01694}01694\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01695}01695\ \textcolor{comment}{//\ The\ router\ ID\ is\ accessible\ through\ the\ DGRRouter\ interface,\ so\ we\ need}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01696}01696\ \textcolor{comment}{//\ to\ QI\ for\ that\ interface.\ \ If\ there's\ no\ DGRRouter\ interface,\ the\ node}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01697}01697\ \textcolor{comment}{//\ in\ question\ cannot\ be\ the\ router\ we\ want,\ so\ we\ continue.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01698}01698\ \textcolor{comment}{//\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01699}01699\ \ \ \ \ \ \ Ptr<DGRRouter>\ rtr\ =\ node-\/>GetObject<\mbox{\hyperlink{classns3_1_1_d_g_r_router}{DGRRouter}}>\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01700}01700\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01701}01701\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!rtr)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01702}01702\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01703}01703\ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}No\ DGRRouter\ interface\ on\ node\ "{}}\ <<\ node-\/>GetId\ ());}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01704}01704\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01705}01705\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01706}01706\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01707}01707\ \textcolor{comment}{//\ If\ the\ router\ ID\ of\ the\ current\ node\ is\ equal\ to\ the\ router\ ID\ of\ the\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01708}01708\ \textcolor{comment}{//\ root\ of\ the\ SPF\ tree,\ then\ this\ node\ is\ the\ one\ for\ which\ we\ need\ to\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01709}01709\ \textcolor{comment}{//\ write\ the\ routing\ tables.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01710}01710\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01711}01711\ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Considering\ router\ "{}}\ <<\ rtr-\/>GetRouterId\ ());}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01712}01712\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01713}01713\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (rtr-\/>GetRouterId\ ()\ ==\ routerId)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01714}01714\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01715}01715\ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Setting\ routes\ for\ node\ "{}}\ <<\ node-\/>GetId\ ());}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01716}01716\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01717}01717\ \textcolor{comment}{//\ Routing\ information\ is\ updated\ using\ the\ Ipv4\ interface.\ \ We\ need\ to\ QI}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01718}01718\ \textcolor{comment}{//\ for\ that\ interface.\ \ If\ the\ node\ is\ acting\ as\ an\ IP\ version\ 4\ router,\ it}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01719}01719\ \textcolor{comment}{//\ should\ absolutely\ have\ an\ Ipv4\ interface.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01720}01720\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01721}01721\ \ \ \ \ \ \ \ \ \ \ Ptr<Ipv4>\ ipv4\ =\ node-\/>GetObject<Ipv4>\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01722}01722\ \ \ \ \ \ \ \ \ \ \ NS\_ASSERT\_MSG\ (ipv4,\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01723}01723\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}DGRRouteManagerImpl::SPFIntraAddRouter\ ():\ "{}}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01724}01724\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}QI\ for\ <Ipv4>\ interface\ failed"{}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01725}01725\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01726}01726\ \textcolor{comment}{//\ Get\ the\ Global\ Router\ Link\ State\ Advertisement\ from\ the\ vertex\ we're}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01727}01727\ \textcolor{comment}{//\ adding\ the\ routes\ to.\ \ The\ LSA\ will\ have\ a\ number\ of\ attached\ Global\ Router}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01728}01728\ \textcolor{comment}{//\ Link\ Records\ corresponding\ to\ links\ off\ of\ that\ vertex\ /\ node.\ \ We're\ going}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01729}01729\ \textcolor{comment}{//\ to\ be\ interested\ in\ the\ records\ corresponding\ to\ point-\/to-\/point\ links.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01730}01730\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01731}01731\ \ \ \ \ \ \ \ \ \ \ NS\_ASSERT\_MSG\ (v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a5f9422d4f1f9df2f301cbd578e29ae7b}{GetLSA}}\ (),\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01732}01732\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}DGRRouteManagerImpl::SPFIntraAddRouter\ ():\ "{}}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01733}01733\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}Expected\ valid\ LSA\ in\ DGRVertex*\ v"{}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01734}01734\ \ \ \ \ \ \ \ \ \ \ Ipv4Mask\ tempmask\ =\ extlsa-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a3e3b9552f26b930f47dd069eaf0f3950}{GetNetworkLSANetworkMask}}\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01735}01735\ \ \ \ \ \ \ \ \ \ \ Ipv4Address\ tempip\ =\ extlsa-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a0ec746b926044a548e4f3a09309322ce}{GetLinkStateId}}\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01736}01736\ \ \ \ \ \ \ \ \ \ \ tempip\ =\ tempip.CombineMask\ (tempmask);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01737}01737\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01738}01738\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01739}01739\ \textcolor{comment}{//\ Here's\ why\ we\ did\ all\ of\ that\ work.\ \ We're\ going\ to\ add\ a\ host\ route\ to\ the}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01740}01740\ \textcolor{comment}{//\ host\ address\ found\ in\ the\ m\_linkData\ field\ of\ the\ point-\/to-\/point\ link}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01741}01741\ \textcolor{comment}{//\ record.\ \ In\ the\ case\ of\ a\ point-\/to-\/point\ link,\ this\ is\ the\ local\ IP\ address}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01742}01742\ \textcolor{comment}{//\ of\ the\ node\ connected\ to\ the\ link.\ \ Each\ of\ these\ point-\/to-\/point\ links}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01743}01743\ \textcolor{comment}{//\ will\ correspond\ to\ a\ local\ interface\ that\ has\ an\ IP\ address\ to\ which}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01744}01744\ \textcolor{comment}{//\ the\ node\ at\ the\ root\ of\ the\ SPF\ tree\ can\ send\ packets.\ \ The\ vertex\ <v>\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01745}01745\ \textcolor{comment}{//\ (corresponding\ to\ the\ node\ that\ has\ these\ links\ and\ interfaces)\ has\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01746}01746\ \textcolor{comment}{//\ an\ m\_nextHop\ address\ precalculated\ for\ us\ that\ is\ the\ address\ to\ which\ the}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01747}01747\ \textcolor{comment}{//\ root\ node\ should\ send\ packets\ to\ be\ forwarded\ to\ these\ IP\ addresses.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01748}01748\ \textcolor{comment}{//\ Similarly,\ the\ vertex\ <v>\ has\ an\ m\_rootOif\ (outbound\ interface\ index)\ to}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01749}01749\ \textcolor{comment}{//\ which\ the\ packets\ should\ be\ send\ for\ forwarding.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01750}01750\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01751}01751\ \ \ \ \ \ \ \ \ \ \ Ptr<DGRRouter>\ router\ =\ node-\/>GetObject<\mbox{\hyperlink{classns3_1_1_d_g_r_router}{DGRRouter}}>\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01752}01752\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!router)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01753}01753\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01754}01754\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01755}01755\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01756}01756\ \ \ \ \ \ \ \ \ \ \ Ptr<Ipv4DGRRouting>\ gr\ =\ router-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_router_a87f63cac54a25accafa7c849a9aa0dbc}{GetRoutingProtocol}}\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01757}01757\ \ \ \ \ \ \ \ \ \ \ NS\_ASSERT\ (gr);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01758}01758\ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ walk\ through\ all\ next-\/hop-\/IPs\ and\ out-\/going-\/interfaces\ for\ reaching}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01759}01759\ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ the\ stub\ network\ gateway\ 'v'\ from\ the\ root\ node}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01760}01760\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (uint32\_t\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ =\ 0;\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ <\ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a691c41409919639a4aaea1443fa26ed5}{GetNRootExitDirections}}\ ();\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}++)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01761}01761\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01762}01762\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_aace20b0a545f431fbc5e3d6a2c149d44}{DGRVertex::NodeExit\_t}}\ exit\ =\ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a9e66f0b2ee7432156046e75672968138}{GetRootExitDirection}}\ (\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01763}01763\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Ipv4Address\ nextHop\ =\ exit.first;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01764}01764\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ int32\_t\ outIf\ =\ exit.second;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01769}01769\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ uint32\_t\ distance\ =\ v-\/>GetDistanceFromRoot\ ();}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01770}01770\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ std::cout\ <<\ "{}the\ SPF\ distance\ =\ "{}\ <<\ distance;}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01771}01771\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01772}01772\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (outIf\ >=\ 0)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01773}01773\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01774}01774\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ gr-\/>AddASExternalRouteTo\ (tempip,\ tempmask,\ nextHop,\ outIf);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01775}01775\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}(Route\ "{}}\ <<\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ <<\ \textcolor{stringliteral}{"{})\ Node\ "{}}\ <<\ node-\/>GetId\ ()\ <<}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01776}01776\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\ add\ external\ network\ route\ to\ "{}}\ <<\ tempip\ <<}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01777}01777\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\ using\ next\ hop\ "{}}\ <<\ nextHop\ <<}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01778}01778\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\ via\ interface\ "{}}\ <<\ outIf);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01779}01779\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01780}01780\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01781}01781\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01782}01782\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}(Route\ "{}}\ <<\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ <<\ \textcolor{stringliteral}{"{})\ Node\ "{}}\ <<\ node-\/>GetId\ ()\ <<}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01783}01783\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\ NOT\ able\ to\ add\ network\ route\ to\ "{}}\ <<\ tempip\ <<}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01784}01784\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\ using\ next\ hop\ "{}}\ <<\ nextHop\ <<}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01785}01785\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\ since\ outgoing\ interface\ id\ is\ negative"{}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01786}01786\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01787}01787\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01788}01788\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01789}01789\ \ \ \ \ \ \ \ \ \}\ \textcolor{comment}{//\ if}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01790}01790\ \ \ \ \ \}\ \textcolor{comment}{//\ for}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01791}01791\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01792}01792\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01793}01793\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01794}01794\ \textcolor{comment}{//\ Processing\ logic\ from\ RFC\ 2328,\ page\ 166\ and\ quagga\ ospf\_spf\_process\_stubs\ ()}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01795}01795\ \textcolor{comment}{//\ stub\ link\ records\ will\ exist\ for\ point-\/to-\/point\ interfaces\ and\ for}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01796}01796\ \textcolor{comment}{//\ broadcast\ interfaces\ for\ which\ no\ neighboring\ router\ can\ be\ found}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01797}01797\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01798}\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a71dd2f4c78a96ecb7d86dd75fd6f78bd}{01798}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a71dd2f4c78a96ecb7d86dd75fd6f78bd}{DGRRouteManagerImpl::SPFProcessStubs}}\ (\mbox{\hyperlink{classns3_1_1_d_g_r_vertex}{DGRVertex}}*\ v)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01799}01799\ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01800}01800\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ v);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01801}01801\ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Processing\ stubs\ for\ "{}}\ <<\ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a83acd923d19102c507faadb2f4e68f56}{GetVertexId}}\ ());}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01802}01802\ \ \ \textcolor{keywordflow}{if}\ (v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a5999846daefbeb25a5265e80e3f3a078}{GetVertexType}}\ ()\ ==\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a4e2ae872c20a6e44e2c53087a4e96ccea0d137433dfa77b24862a5f2c116da286}{DGRVertex::VertexRouter}})}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01803}01803\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01804}01804\ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a}{DGRRoutingLSA}}\ *rlsa\ =\ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a5f9422d4f1f9df2f301cbd578e29ae7b}{GetLSA}}\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01805}01805\ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Processing\ router\ LSA\ with\ id\ "{}}\ <<\ rlsa-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a0ec746b926044a548e4f3a09309322ce}{GetLinkStateId}}\ ());}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01806}01806\ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (uint32\_t\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ =\ 0;\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ <\ rlsa-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a882a042d18bcbdea3bc1a3eb55dcfe58}{GetNLinkRecords}}\ ();\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}++)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01807}01807\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01808}01808\ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Examining\ link\ "{}}\ <<\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ <<\ \textcolor{stringliteral}{"{}\ of\ "{}}\ <<\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01809}01809\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a83acd923d19102c507faadb2f4e68f56}{GetVertexId}}\ ()\ <<\ \textcolor{stringliteral}{"{}'s\ "{}}\ <<}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01810}01810\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a5f9422d4f1f9df2f301cbd578e29ae7b}{GetLSA}}\ ()-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a882a042d18bcbdea3bc1a3eb55dcfe58}{GetNLinkRecords}}\ ()\ <<\ \textcolor{stringliteral}{"{}\ link\ records"{}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01811}01811\ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record}{DGRRoutingLinkRecord}}\ *l\ =\ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a5f9422d4f1f9df2f301cbd578e29ae7b}{GetLSA}}\ ()-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_acb5df9fec863df510911aa3e64d4aa04}{GetLinkRecord}}\ (\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01812}01812\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (l-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_ab9148eaf7a9d088a397e66164c1f30b9}{GetLinkType}}\ ()\ ==\ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_a93b89b9f89407a39712186911ad12a4ba31c95bb0542fb4fab6cb056f88eea561}{DGRRoutingLinkRecord::StubNetwork}})}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01813}01813\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01814}01814\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Found\ a\ Stub\ record\ to\ "{}}\ <<\ l-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_a9fe6e135674ef321bc11b48f90071857}{GetLinkId}}\ ());}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01815}01815\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a403b832078dcb8a4facb2ae6c7b2ce15}{SPFIntraAddStub}}\ (l,\ v);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01816}01816\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01817}01817\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01818}01818\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01819}01819\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01820}01820\ \ \ \textcolor{keywordflow}{for}\ (uint32\_t\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ =\ 0;\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ <\ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a504717b90b3fad088d133c2e71836eaf}{GetNChildren}}\ ();\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}++)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01821}01821\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01822}01822\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_aea98bf4a660837344a4c802546249a21}{GetChild}}\ (\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}})-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a6afcdedc8616fc035f8c9736d5679cd4}{IsVertexProcessed}}\ ())}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01823}01823\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01824}01824\ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a71dd2f4c78a96ecb7d86dd75fd6f78bd}{SPFProcessStubs}}\ (v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_aea98bf4a660837344a4c802546249a21}{GetChild}}\ (\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}));}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01825}01825\ \ \ \ \ \ \ \ \ \ \ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_aea98bf4a660837344a4c802546249a21}{GetChild}}\ (\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}})-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_aa1718a99ec16d3ebf25949e3edac9168}{SetVertexProcessed}}\ (\textcolor{keyword}{true});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01826}01826\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01827}01827\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01828}01828\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01829}01829\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01830}01830\ \textcolor{comment}{//\ RFC2328\ 16.1.\ second\ stage.\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01831}01831\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01832}\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a403b832078dcb8a4facb2ae6c7b2ce15}{01832}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a403b832078dcb8a4facb2ae6c7b2ce15}{DGRRouteManagerImpl::SPFIntraAddStub}}\ (\mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record}{DGRRoutingLinkRecord}}\ *l,\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex}{DGRVertex}}*\ v)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01833}01833\ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01834}01834\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ l\ <<\ v);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01835}01835\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01836}01836\ \ \ NS\_ASSERT\_MSG\ (\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a51238c1122fc794564a658bf852d6910}{m\_spfroot}},\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01837}01837\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}DGRRouteManagerImpl::SPFIntraAddStub\ ():\ Root\ pointer\ not\ set"{}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01838}01838\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01839}01839\ \ \ \textcolor{comment}{//\ XXX\ simplifed\ logic\ for\ the\ moment.\ \ There\ are\ two\ cases\ to\ consider:}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01840}01840\ \ \ \textcolor{comment}{//\ 1)\ the\ stub\ network\ is\ on\ this\ router;\ do\ nothing\ for\ now}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01841}01841\ \ \ \textcolor{comment}{//\ \ \ \ (already\ handled\ above)}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01842}01842\ \ \ \textcolor{comment}{//\ 2)\ the\ stub\ network\ is\ on\ a\ remote\ router,\ so\ I\ should\ use\ the}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01843}01843\ \ \ \textcolor{comment}{//\ same\ next\ hop\ that\ I\ use\ to\ get\ to\ vertex\ v}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01844}01844\ \ \ \textcolor{keywordflow}{if}\ (v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a83acd923d19102c507faadb2f4e68f56}{GetVertexId}}\ ()\ ==\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a51238c1122fc794564a658bf852d6910}{m\_spfroot}}-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a83acd923d19102c507faadb2f4e68f56}{GetVertexId}}\ ())}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01845}01845\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01846}01846\ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Stub\ is\ on\ local\ host:\ "{}}\ <<\ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a83acd923d19102c507faadb2f4e68f56}{GetVertexId}}\ ()\ <<\ \textcolor{stringliteral}{"{};\ returning"{}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01847}01847\ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01848}01848\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01849}01849\ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Stub\ is\ on\ remote\ host:\ "{}}\ <<\ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a83acd923d19102c507faadb2f4e68f56}{GetVertexId}}\ ()\ <<\ \textcolor{stringliteral}{"{};\ installing"{}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01850}01850\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01851}01851\ \textcolor{comment}{//\ The\ root\ of\ the\ Shortest\ Path\ First\ tree\ is\ the\ router\ to\ which\ we\ are\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01852}01852\ \textcolor{comment}{//\ going\ to\ write\ the\ actual\ routing\ table\ entries.\ \ The\ vertex\ corresponding}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01853}01853\ \textcolor{comment}{//\ to\ this\ router\ has\ a\ vertex\ ID\ which\ is\ the\ router\ ID\ of\ that\ node.\ \ We're}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01854}01854\ \textcolor{comment}{//\ going\ to\ use\ this\ ID\ to\ discover\ which\ node\ it\ is\ that\ we're\ actually\ going}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01855}01855\ \textcolor{comment}{//\ to\ update.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01856}01856\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01857}01857\ \ \ Ipv4Address\ routerId\ =\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a51238c1122fc794564a658bf852d6910}{m\_spfroot}}-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a83acd923d19102c507faadb2f4e68f56}{GetVertexId}}\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01858}01858\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01859}01859\ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Vertex\ ID\ =\ "{}}\ <<\ routerId);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01860}01860\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01861}01861\ \textcolor{comment}{//\ We\ need\ to\ walk\ the\ list\ of\ nodes\ looking\ for\ the\ one\ that\ has\ the\ router}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01862}01862\ \textcolor{comment}{//\ ID\ corresponding\ to\ the\ root\ vertex.\ \ This\ is\ the\ one\ we're\ going\ to\ write}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01863}01863\ \textcolor{comment}{//\ the\ routing\ information\ to.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01864}01864\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01865}01865\ \ \ NodeList::Iterator\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ =\ NodeList::Begin\ ();\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01866}01866\ \ \ NodeList::Iterator\ listEnd\ =\ NodeList::End\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01867}01867\ \ \ \textcolor{keywordflow}{for}\ (;\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ !=\ listEnd;\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}++)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01868}01868\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01869}01869\ \ \ \ \ \ \ Ptr<Node>\ node\ =\ *\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01870}01870\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01871}01871\ \textcolor{comment}{//\ The\ router\ ID\ is\ accessible\ through\ the\ DGRRouter\ interface,\ so\ we\ need}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01872}01872\ \textcolor{comment}{//\ to\ QI\ for\ that\ interface.\ \ If\ there's\ no\ DGRRouter\ interface,\ the\ node}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01873}01873\ \textcolor{comment}{//\ in\ question\ cannot\ be\ the\ router\ we\ want,\ so\ we\ continue.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01874}01874\ \textcolor{comment}{//\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01875}01875\ \ \ \ \ \ \ Ptr<DGRRouter>\ rtr\ =\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01876}01876\ \ \ \ \ \ \ \ \ node-\/>GetObject<\mbox{\hyperlink{classns3_1_1_d_g_r_router}{DGRRouter}}>\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01877}01877\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01878}01878\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!rtr)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01879}01879\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01880}01880\ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}No\ DGRRouter\ interface\ on\ node\ "{}}\ <<\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01881}01881\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ node-\/>GetId\ ());}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01882}01882\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01883}01883\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01884}01884\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01885}01885\ \textcolor{comment}{//\ If\ the\ router\ ID\ of\ the\ current\ node\ is\ equal\ to\ the\ router\ ID\ of\ the\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01886}01886\ \textcolor{comment}{//\ root\ of\ the\ SPF\ tree,\ then\ this\ node\ is\ the\ one\ for\ which\ we\ need\ to\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01887}01887\ \textcolor{comment}{//\ write\ the\ routing\ tables.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01888}01888\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01889}01889\ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Considering\ router\ "{}}\ <<\ rtr-\/>GetRouterId\ ());}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01890}01890\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01891}01891\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (rtr-\/>GetRouterId\ ()\ ==\ routerId)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01892}01892\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01893}01893\ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Setting\ routes\ for\ node\ "{}}\ <<\ node-\/>GetId\ ());}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01894}01894\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01895}01895\ \textcolor{comment}{//\ Routing\ information\ is\ updated\ using\ the\ Ipv4\ interface.\ \ We\ need\ to\ QI}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01896}01896\ \textcolor{comment}{//\ for\ that\ interface.\ \ If\ the\ node\ is\ acting\ as\ an\ IP\ version\ 4\ router,\ it}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01897}01897\ \textcolor{comment}{//\ should\ absolutely\ have\ an\ Ipv4\ interface.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01898}01898\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01899}01899\ \ \ \ \ \ \ \ \ \ \ Ptr<Ipv4>\ ipv4\ =\ node-\/>GetObject<Ipv4>\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01900}01900\ \ \ \ \ \ \ \ \ \ \ NS\_ASSERT\_MSG\ (ipv4,\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01901}01901\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}DGRRouteManagerImpl::SPFIntraAddRouter\ ():\ "{}}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01902}01902\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}QI\ for\ <Ipv4>\ interface\ failed"{}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01903}01903\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01904}01904\ \textcolor{comment}{//\ Get\ the\ Global\ Router\ Link\ State\ Advertisement\ from\ the\ vertex\ we're}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01905}01905\ \textcolor{comment}{//\ adding\ the\ routes\ to.\ \ The\ LSA\ will\ have\ a\ number\ of\ attached\ Global\ Router}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01906}01906\ \textcolor{comment}{//\ Link\ Records\ corresponding\ to\ links\ off\ of\ that\ vertex\ /\ node.\ \ We're\ going}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01907}01907\ \textcolor{comment}{//\ to\ be\ interested\ in\ the\ records\ corresponding\ to\ point-\/to-\/point\ links.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01908}01908\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01909}01909\ \ \ \ \ \ \ \ \ \ \ NS\_ASSERT\_MSG\ (v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a5f9422d4f1f9df2f301cbd578e29ae7b}{GetLSA}}\ (),\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01910}01910\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}DGRRouteManagerImpl::SPFIntraAddRouter\ ():\ "{}}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01911}01911\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}Expected\ valid\ LSA\ in\ DGRVertex*\ v"{}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01912}01912\ \ \ \ \ \ \ \ \ \ \ Ipv4Mask\ tempmask\ (l-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_a97080a8409f77898f4485230be0be5e4}{GetLinkData}}\ ().Get\ ());}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01913}01913\ \ \ \ \ \ \ \ \ \ \ Ipv4Address\ tempip\ =\ l-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_a9fe6e135674ef321bc11b48f90071857}{GetLinkId}}\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01914}01914\ \ \ \ \ \ \ \ \ \ \ tempip\ =\ tempip.CombineMask\ (tempmask);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01915}01915\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01916}01916\ \textcolor{comment}{//\ Here's\ why\ we\ did\ all\ of\ that\ work.\ \ We're\ going\ to\ add\ a\ host\ route\ to\ the}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01917}01917\ \textcolor{comment}{//\ host\ address\ found\ in\ the\ m\_linkData\ field\ of\ the\ point-\/to-\/point\ link}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01918}01918\ \textcolor{comment}{//\ record.\ \ In\ the\ case\ of\ a\ point-\/to-\/point\ link,\ this\ is\ the\ local\ IP\ address}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01919}01919\ \textcolor{comment}{//\ of\ the\ node\ connected\ to\ the\ link.\ \ Each\ of\ these\ point-\/to-\/point\ links}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01920}01920\ \textcolor{comment}{//\ will\ correspond\ to\ a\ local\ interface\ that\ has\ an\ IP\ address\ to\ which}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01921}01921\ \textcolor{comment}{//\ the\ node\ at\ the\ root\ of\ the\ SPF\ tree\ can\ send\ packets.\ \ The\ vertex\ <v>\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01922}01922\ \textcolor{comment}{//\ (corresponding\ to\ the\ node\ that\ has\ these\ links\ and\ interfaces)\ has\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01923}01923\ \textcolor{comment}{//\ an\ m\_nextHop\ address\ precalculated\ for\ us\ that\ is\ the\ address\ to\ which\ the}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01924}01924\ \textcolor{comment}{//\ root\ node\ should\ send\ packets\ to\ be\ forwarded\ to\ these\ IP\ addresses.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01925}01925\ \textcolor{comment}{//\ Similarly,\ the\ vertex\ <v>\ has\ an\ m\_rootOif\ (outbound\ interface\ index)\ to}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01926}01926\ \textcolor{comment}{//\ which\ the\ packets\ should\ be\ send\ for\ forwarding.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01927}01927\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01928}01928\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01929}01929\ \ \ \ \ \ \ \ \ \ \ Ptr<DGRRouter>\ router\ =\ node-\/>GetObject<\mbox{\hyperlink{classns3_1_1_d_g_r_router}{DGRRouter}}>\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01930}01930\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!router)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01931}01931\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01932}01932\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01933}01933\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01934}01934\ \ \ \ \ \ \ \ \ \ \ Ptr<Ipv4DGRRouting>\ gr\ =\ router-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_router_a87f63cac54a25accafa7c849a9aa0dbc}{GetRoutingProtocol}}\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01935}01935\ \ \ \ \ \ \ \ \ \ \ NS\_ASSERT\ (gr);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01936}01936\ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ walk\ through\ all\ next-\/hop-\/IPs\ and\ out-\/going-\/interfaces\ for\ reaching}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01937}01937\ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ the\ stub\ network\ gateway\ 'v'\ from\ the\ root\ node}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01938}01938\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (uint32\_t\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ =\ 0;\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ <\ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a691c41409919639a4aaea1443fa26ed5}{GetNRootExitDirections}}\ ();\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}++)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01939}01939\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01940}01940\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_aace20b0a545f431fbc5e3d6a2c149d44}{DGRVertex::NodeExit\_t}}\ exit\ =\ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a9e66f0b2ee7432156046e75672968138}{GetRootExitDirection}}\ (\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01941}01941\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Ipv4Address\ nextHop\ =\ exit.first;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01942}01942\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ int32\_t\ outIf\ =\ exit.second;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01943}01943\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (outIf\ >=\ 0)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01944}01944\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01945}01945\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ gr-\/>AddNetworkRouteTo\ (tempip,\ tempmask,\ nextHop,\ outIf);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01946}01946\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}(Route\ "{}}\ <<\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ <<\ \textcolor{stringliteral}{"{})\ Node\ "{}}\ <<\ node-\/>GetId\ ()\ <<}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01947}01947\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\ add\ network\ route\ to\ "{}}\ <<\ tempip\ <<}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01948}01948\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\ using\ next\ hop\ "{}}\ <<\ nextHop\ <<}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01949}01949\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\ via\ interface\ "{}}\ <<\ outIf);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01950}01950\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01951}01951\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01952}01952\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01953}01953\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}(Route\ "{}}\ <<\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ <<\ \textcolor{stringliteral}{"{})\ Node\ "{}}\ <<\ node-\/>GetId\ ()\ <<}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01954}01954\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\ NOT\ able\ to\ add\ network\ route\ to\ "{}}\ <<\ tempip\ <<}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01955}01955\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\ using\ next\ hop\ "{}}\ <<\ nextHop\ <<}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01956}01956\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\ since\ outgoing\ interface\ id\ is\ negative"{}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01957}01957\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01958}01958\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01959}01959\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01960}01960\ \ \ \ \ \ \ \ \ \}\ \textcolor{comment}{//\ if}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01961}01961\ \ \ \ \ \}\ \textcolor{comment}{//\ for}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01962}01962\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01963}01963\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01964}01964\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01965}01965\ \textcolor{comment}{//\ Return\ the\ interface\ number\ corresponding\ to\ a\ given\ IP\ address\ and\ mask}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01966}01966\ \textcolor{comment}{//\ This\ is\ a\ wrapper\ around\ GetInterfaceForPrefix(),\ but\ we\ first}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01967}01967\ \textcolor{comment}{//\ have\ to\ find\ the\ right\ node\ pointer\ to\ pass\ to\ that\ function.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01968}01968\ \textcolor{comment}{//\ If\ no\ such\ interface\ is\ found,\ return\ -\/1\ (note:\ \ unit\ test\ framework}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01969}01969\ \textcolor{comment}{//\ for\ routing\ assumes\ -\/1\ to\ be\ a\ legal\ return\ value)}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01970}01970\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01971}01971\ int32\_t}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01972}\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a017c230a5a38bc81243ebf39e94bd36b}{01972}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a017c230a5a38bc81243ebf39e94bd36b}{DGRRouteManagerImpl::FindOutgoingInterfaceId}}\ (Ipv4Address\ a,\ Ipv4Mask\ amask)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01973}01973\ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01974}01974\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ a\ <<\ amask);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01975}01975\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01976}01976\ \textcolor{comment}{//\ We\ have\ an\ IP\ address\ <a>\ and\ a\ vertex\ ID\ of\ the\ root\ of\ the\ SPF\ tree.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01977}01977\ \textcolor{comment}{//\ The\ question\ is\ what\ interface\ index\ does\ this\ address\ correspond\ to.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01978}01978\ \textcolor{comment}{//\ The\ answer\ is\ a\ little\ complicated\ since\ we\ have\ to\ find\ a\ pointer\ to}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01979}01979\ \textcolor{comment}{//\ the\ node\ corresponding\ to\ the\ vertex\ ID,\ find\ the\ Ipv4\ interface\ on\ that}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01980}01980\ \textcolor{comment}{//\ node\ in\ order\ to\ iterate\ the\ interfaces\ and\ find\ the\ one\ corresponding\ to}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01981}01981\ \textcolor{comment}{//\ the\ address\ in\ question.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01982}01982\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01983}01983\ \ \ Ipv4Address\ routerId\ =\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a51238c1122fc794564a658bf852d6910}{m\_spfroot}}-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a83acd923d19102c507faadb2f4e68f56}{GetVertexId}}\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01984}01984\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01985}01985\ \textcolor{comment}{//\ Walk\ the\ list\ of\ nodes\ in\ the\ system\ looking\ for\ the\ one\ corresponding\ to}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01986}01986\ \textcolor{comment}{//\ the\ node\ at\ the\ root\ of\ the\ SPF\ tree.\ \ This\ is\ the\ node\ for\ which\ we\ are}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01987}01987\ \textcolor{comment}{//\ building\ the\ routing\ table.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01988}01988\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01989}01989\ \ \ NodeList::Iterator\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ =\ NodeList::Begin\ ();\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01990}01990\ \ \ NodeList::Iterator\ listEnd\ =\ NodeList::End\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01991}01991\ \ \ \textcolor{keywordflow}{for}\ (;\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ !=\ listEnd;\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}++)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01992}01992\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01993}01993\ \ \ \ \ \ \ Ptr<Node>\ node\ =\ *\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01994}01994\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01995}01995\ \ \ \ \ \ \ Ptr<DGRRouter>\ rtr\ =\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01996}01996\ \ \ \ \ \ \ \ \ node-\/>GetObject<\mbox{\hyperlink{classns3_1_1_d_g_r_router}{DGRRouter}}>\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01997}01997\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01998}01998\ \textcolor{comment}{//\ If\ the\ node\ doesn't\ have\ a\ DGRRouter\ interface\ it\ can't\ be\ the\ one}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l01999}01999\ \textcolor{comment}{//\ we're\ interested\ in.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02000}02000\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02001}02001\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!rtr)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02002}02002\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02003}02003\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02004}02004\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02005}02005\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02006}02006\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (rtr-\/>GetRouterId\ ()\ ==\ routerId)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02007}02007\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02008}02008\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02009}02009\ \textcolor{comment}{//\ This\ is\ the\ node\ we're\ building\ the\ routing\ table\ for.\ \ We're\ going\ to\ need}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02010}02010\ \textcolor{comment}{//\ the\ Ipv4\ interface\ to\ look\ for\ the\ ipv4\ interface\ index.\ \ Since\ this\ node}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02011}02011\ \textcolor{comment}{//\ is\ participating\ in\ routing\ IP\ version\ 4\ packets,\ it\ certainly\ must\ have\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02012}02012\ \textcolor{comment}{//\ an\ Ipv4\ interface.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02013}02013\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02014}02014\ \ \ \ \ \ \ \ \ \ \ Ptr<Ipv4>\ ipv4\ =\ node-\/>GetObject<Ipv4>\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02015}02015\ \ \ \ \ \ \ \ \ \ \ NS\_ASSERT\_MSG\ (ipv4,\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02016}02016\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}DGRRouteManagerImpl::FindOutgoingInterfaceId\ ():\ "{}}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02017}02017\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}GetObject\ for\ <Ipv4>\ interface\ failed"{}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02018}02018\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02019}02019\ \textcolor{comment}{//\ Look\ through\ the\ interfaces\ on\ this\ node\ for\ one\ that\ has\ the\ IP\ address}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02020}02020\ \textcolor{comment}{//\ we're\ looking\ for.\ \ If\ we\ find\ one,\ return\ the\ corresponding\ interface}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02021}02021\ \textcolor{comment}{//\ index,\ or\ -\/1\ if\ not\ found.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02022}02022\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02023}02023\ \ \ \ \ \ \ \ \ \ \ int32\_t\ \textcolor{keyword}{interface\ }=\ ipv4-\/>GetInterfaceForPrefix\ (a,\ amask);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02024}02024\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02025}02025\ \textcolor{preprocessor}{\#if\ 0}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02026}02026\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (interface\ <\ 0)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02027}02027\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02028}02028\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NS\_FATAL\_ERROR\ (\textcolor{stringliteral}{"{}DGRRouteManagerImpl::FindOutgoingInterfaceId():\ "{}}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02029}02029\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}Expected\ an\ interface\ associated\ with\ address\ a:"{}}\ <<\ a);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02030}02030\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02031}02031\ \textcolor{preprocessor}{\#endif\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02032}02032\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ interface;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02033}02033\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02034}02034\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02035}02035\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02036}02036\ \textcolor{comment}{//\ Couldn't\ find\ it.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02037}02037\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02038}02038\ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}FindOutgoingInterfaceId():Can't\ find\ root\ node\ "{}}\ <<\ routerId);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02039}02039\ \ \ \textcolor{keywordflow}{return}\ -\/1;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02040}02040\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02041}02041\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02042}02042\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02043}02043\ \textcolor{comment}{//\ This\ method\ is\ derived\ from\ quagga\ ospf\_intra\_add\_router\ ()}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02044}02044\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02045}02045\ \textcolor{comment}{//\ This\ is\ where\ we\ are\ actually\ going\ to\ add\ the\ host\ routes\ to\ the\ routing}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02046}02046\ \textcolor{comment}{//\ tables\ of\ the\ individual\ nodes.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02047}02047\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02048}02048\ \textcolor{comment}{//\ The\ vertex\ passed\ as\ a\ parameter\ has\ just\ been\ added\ to\ the\ SPF\ tree.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02049}02049\ \textcolor{comment}{//\ This\ vertex\ must\ have\ a\ valid\ m\_root\_oid,\ corresponding\ to\ the\ outgoing}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02050}02050\ \textcolor{comment}{//\ interface\ on\ the\ root\ router\ of\ the\ tree\ that\ is\ the\ first\ hop\ on\ the\ path}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02051}02051\ \textcolor{comment}{//\ to\ the\ vertex.\ \ The\ vertex\ must\ also\ have\ a\ next\ hop\ address,\ corresponding}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02052}02052\ \textcolor{comment}{//\ to\ the\ next\ hop\ on\ the\ path\ to\ the\ vertex.\ \ The\ vertex\ has\ an\ m\_lsa\ field}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02053}02053\ \textcolor{comment}{//\ that\ has\ some\ number\ of\ link\ records.\ \ For\ each\ point\ to\ point\ link\ record,}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02054}02054\ \textcolor{comment}{//\ the\ m\_linkData\ is\ the\ local\ IP\ address\ of\ the\ link.\ \ This\ corresponds\ to}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02055}02055\ \textcolor{comment}{//\ a\ destination\ IP\ address,\ reachable\ from\ the\ root,\ to\ which\ we\ add\ a\ host}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02056}02056\ \textcolor{comment}{//\ route.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02057}02057\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02058}02058\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02059}\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a58756bc6216f5ebe1941a2102ae4cdf9}{02059}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a58756bc6216f5ebe1941a2102ae4cdf9}{DGRRouteManagerImpl::SPFIntraAddRouter}}\ (\mbox{\hyperlink{classns3_1_1_d_g_r_vertex}{DGRVertex}}*\ v,\ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex}{DGRVertex}}*\ v\_init,\ Ipv4Address\ nextHop,\ uint32\_t\ Iface)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02060}02060\ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02061}02061\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ v);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02062}02062\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02063}02063\ \ \ NS\_ASSERT\_MSG\ (\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a51238c1122fc794564a658bf852d6910}{m\_spfroot}},\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02064}02064\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}DGRRouteManagerImpl::SPFIntraAddRouter\ ():\ Root\ pointer\ not\ set"{}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02065}02065\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02066}02066\ \textcolor{comment}{//\ The\ root\ of\ the\ Shortest\ Path\ First\ tree\ is\ the\ router\ to\ which\ we\ are\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02067}02067\ \textcolor{comment}{//\ going\ to\ write\ the\ actual\ routing\ table\ entries.\ \ The\ vertex\ corresponding}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02068}02068\ \textcolor{comment}{//\ to\ this\ router\ has\ a\ vertex\ ID\ which\ is\ the\ router\ ID\ of\ that\ node.\ \ We're}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02069}02069\ \textcolor{comment}{//\ going\ to\ use\ this\ ID\ to\ discover\ which\ node\ it\ is\ that\ we're\ actually\ going}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02070}02070\ \textcolor{comment}{//\ to\ update.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02071}02071\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02072}02072\ \ \ Ipv4Address\ routerId\ =\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a51238c1122fc794564a658bf852d6910}{m\_spfroot}}-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a83acd923d19102c507faadb2f4e68f56}{GetVertexId}}\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02073}02073\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02078}02078\ \ \ Ipv4Address\ routerId\_init\ =\ v\_init-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a83acd923d19102c507faadb2f4e68f56}{GetVertexId}}\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02079}02079\ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Vertex\ ID\ =\ "{}}\ <<\ routerId);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02080}02080\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02081}02081\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02082}02082\ \textcolor{comment}{//\ We\ need\ to\ walk\ the\ list\ of\ nodes\ looking\ for\ the\ one\ that\ has\ the\ router}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02083}02083\ \textcolor{comment}{//\ ID\ corresponding\ to\ the\ root\ vertex.\ \ This\ is\ the\ one\ we're\ going\ to\ write}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02084}02084\ \textcolor{comment}{//\ the\ routing\ information\ to.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02085}02085\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02086}02086\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02087}02087\ \ \ NodeList::Iterator\ listEnd\ =\ NodeList::End\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02088}02088\ \ \ NodeList::Iterator\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ =\ NodeList::Begin\ ();\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02089}02089\ \ \ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02090}02090\ \ \ \textcolor{keywordflow}{for}\ (;\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ !=\ listEnd;\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}++)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02091}02091\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02092}02092\ \ \ \ \ \ \ Ptr<Node>\ node\ =\ *\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02093}02093\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02094}02094\ \textcolor{comment}{//\ The\ router\ ID\ is\ accessible\ through\ the\ GlobalRouter\ interface,\ so\ we\ need}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02095}02095\ \textcolor{comment}{//\ to\ GetObject\ for\ that\ interface.\ \ If\ there's\ no\ GlobalRouter\ interface,\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02096}02096\ \textcolor{comment}{//\ the\ node\ in\ question\ cannot\ be\ the\ router\ we\ want,\ so\ we\ continue.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02097}02097\ \textcolor{comment}{//\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02098}02098\ \ \ \ \ \ \ Ptr<DGRRouter>\ rtr\ =\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02099}02099\ \ \ \ \ \ \ \ \ node-\/>GetObject<\mbox{\hyperlink{classns3_1_1_d_g_r_router}{DGRRouter}}>\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02100}02100\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02101}02101\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!rtr)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02102}02102\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02103}02103\ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}No\ GlobalRouter\ interface\ on\ node\ "{}}\ <<\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02104}02104\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ node-\/>GetId\ ());}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02105}02105\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02106}02106\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02107}02107\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ std::cout\ <<\ "{}The\ neighbour\ node\ "{}\ <<\ node-\/>GetId\ ()\ <<\ std::endl;}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02108}02108\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02109}02109\ \textcolor{comment}{//\ If\ the\ router\ ID\ of\ the\ current\ node\ is\ equal\ to\ the\ router\ ID\ of\ the\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02110}02110\ \textcolor{comment}{//\ root\ of\ the\ SPF\ tree,\ then\ this\ node\ is\ the\ one\ for\ which\ we\ need\ to\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02111}02111\ \textcolor{comment}{//\ write\ the\ routing\ tables.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02112}02112\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02113}02113\ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Considering\ router\ "{}}\ <<\ rtr-\/>GetRouterId\ ());}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02114}02114\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02115}02115\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (rtr-\/>GetRouterId\ ()\ ==\ routerId\_init)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02116}02116\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02117}02117\ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Setting\ routes\ for\ node\ "{}}\ <<\ node-\/>GetId\ ());}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02118}02118\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02119}02119\ \textcolor{comment}{//\ Routing\ information\ is\ updated\ using\ the\ Ipv4\ interface.\ \ We\ need\ to\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02120}02120\ \textcolor{comment}{//\ GetObject\ for\ that\ interface.\ \ If\ the\ node\ is\ acting\ as\ an\ IP\ version\ 4\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02121}02121\ \textcolor{comment}{//\ router,\ it\ should\ absolutely\ have\ an\ Ipv4\ interface.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02122}02122\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02123}02123\ \ \ \ \ \ \ \ \ \ \ Ptr<Ipv4>\ ipv4\ =\ node-\/>GetObject<Ipv4>\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02124}02124\ \ \ \ \ \ \ \ \ \ \ NS\_ASSERT\_MSG\ (ipv4,\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02125}02125\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}DGRRouteManagerImpl::SPFIntraAddRouter\ ():\ "{}}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02126}02126\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}GetObject\ for\ <Ipv4>\ interface\ failed"{}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02127}02127\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02128}02128\ \textcolor{comment}{//\ Get\ the\ Global\ Router\ Link\ State\ Advertisement\ from\ the\ vertex\ we're}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02129}02129\ \textcolor{comment}{//\ adding\ the\ routes\ to.\ \ The\ LSA\ will\ have\ a\ number\ of\ attached\ Global\ Router}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02130}02130\ \textcolor{comment}{//\ Link\ Records\ corresponding\ to\ links\ off\ of\ that\ vertex\ /\ node.\ \ We're\ going}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02131}02131\ \textcolor{comment}{//\ to\ be\ interested\ in\ the\ records\ corresponding\ to\ point-\/to-\/point\ links.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02132}02132\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02133}02133\ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a}{DGRRoutingLSA}}\ *lsa\ =\ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a5f9422d4f1f9df2f301cbd578e29ae7b}{GetLSA}}\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02134}02134\ \ \ \ \ \ \ \ \ \ \ NS\_ASSERT\_MSG\ (lsa,\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02135}02135\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}DGRRouteManagerImpl::SPFIntraAddRouter\ ():\ "{}}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02136}02136\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}Expected\ valid\ LSA\ in\ DGRVertex*\ v"{}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02137}02137\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02138}02138\ \ \ \ \ \ \ \ \ \ \ uint32\_t\ nLinkRecords\ =\ lsa-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a882a042d18bcbdea3bc1a3eb55dcfe58}{GetNLinkRecords}}\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02139}02139\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02140}02140\ \textcolor{comment}{//\ Iterate\ through\ the\ link\ records\ on\ the\ vertex\ to\ which\ we're\ going\ to\ add}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02141}02141\ \textcolor{comment}{//\ routes.\ \ To\ make\ sure\ we're\ being\ clear,\ we're\ going\ to\ add\ routing\ table}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02142}02142\ \textcolor{comment}{//\ entries\ to\ the\ tables\ on\ the\ node\ corresping\ to\ the\ root\ of\ the\ SPF\ tree.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02143}02143\ \textcolor{comment}{//\ These\ entries\ will\ have\ routes\ to\ the\ IP\ addresses\ we\ find\ from\ looking\ at}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02144}02144\ \textcolor{comment}{//\ the\ local\ side\ of\ the\ point-\/to-\/point\ links\ found\ on\ the\ node\ described\ by}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02145}02145\ \textcolor{comment}{//\ the\ vertex\ <v>.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02146}02146\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02147}02147\ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}\ Node\ "{}}\ <<\ node-\/>GetId\ ()\ <<}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02148}02148\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\ found\ "{}}\ <<\ nLinkRecords\ <<\ \textcolor{stringliteral}{"{}\ link\ records\ in\ LSA\ "{}}\ <<\ lsa\ <<\ \textcolor{stringliteral}{"{}with\ LinkStateId\ "{}}<<\ lsa-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a0ec746b926044a548e4f3a09309322ce}{GetLinkStateId}}\ ());}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02149}02149\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (uint32\_t\ j\ =\ 0;\ j\ <\ nLinkRecords;\ ++j)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02150}02150\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02151}02151\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02152}02152\ \textcolor{comment}{//\ We\ are\ only\ concerned\ about\ point-\/to-\/point\ links}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02153}02153\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02154}02154\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record}{DGRRoutingLinkRecord}}\ *lr\ =\ lsa-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_acb5df9fec863df510911aa3e64d4aa04}{GetLinkRecord}}\ (j);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02155}02155\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (lr-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_ab9148eaf7a9d088a397e66164c1f30b9}{GetLinkType}}\ ()\ !=\ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_a93b89b9f89407a39712186911ad12a4bac9c0a2d3da9eb9fdafee93e52a498c84}{DGRRoutingLinkRecord::PointToPoint}})}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02156}02156\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02157}02157\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02158}02158\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02159}02159\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Ptr<DGRRouter>\ router\ =\ node-\/>GetObject<\mbox{\hyperlink{classns3_1_1_d_g_r_router}{DGRRouter}}>\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02160}02160\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!router)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02161}02161\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02162}02162\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02163}02163\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02164}02164\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Ptr<Ipv4DGRRouting>\ gr\ =\ router-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_router_a87f63cac54a25accafa7c849a9aa0dbc}{GetRoutingProtocol}}\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02165}02165\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NS\_ASSERT\ (gr);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02166}02166\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ uint32\_t\ distance\ =\ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a307ee8139d815f7f26b8cf01e6885b53}{GetDistanceFromRoot}}\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02167}02167\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a691c41409919639a4aaea1443fa26ed5}{GetNRootExitDirections}}\ ()\ >=\ 1)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02168}02168\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02169}02169\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ int32\_t\ nextIface\ =\ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a9e66f0b2ee7432156046e75672968138}{GetRootExitDirection}}\ (0).second;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02170}02170\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ gr-\/>AddHostRouteTo\ (lr-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_link_record_a97080a8409f77898f4485230be0be5e4}{GetLinkData}}\ (),\ nextHop,\ Iface,\ nextIface,\ distance);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02171}02171\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02172}02172\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02173}02173\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02174}02174\ \textcolor{comment}{//\ Done\ adding\ the\ routes\ for\ the\ selected\ node.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02175}02175\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02176}02176\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02177}02177\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02178}02178\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02179}02179\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02180}02180\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02181}\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a80ce56eb81842ac31afccfdd698d1d73}{02181}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a80ce56eb81842ac31afccfdd698d1d73}{DGRRouteManagerImpl::SPFIntraAddTransit}}\ (\mbox{\hyperlink{classns3_1_1_d_g_r_vertex}{DGRVertex}}*\ v)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02182}02182\ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02183}02183\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ v);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02184}02184\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02185}02185\ \ \ NS\_ASSERT\_MSG\ (\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a51238c1122fc794564a658bf852d6910}{m\_spfroot}},\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02186}02186\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}DGRRouteManagerImpl::SPFIntraAddTransit\ ():\ Root\ pointer\ not\ set"{}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02187}02187\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02188}02188\ \textcolor{comment}{//\ The\ root\ of\ the\ Shortest\ Path\ First\ tree\ is\ the\ router\ to\ which\ we\ are\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02189}02189\ \textcolor{comment}{//\ going\ to\ write\ the\ actual\ routing\ table\ entries.\ \ The\ vertex\ corresponding}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02190}02190\ \textcolor{comment}{//\ to\ this\ router\ has\ a\ vertex\ ID\ which\ is\ the\ router\ ID\ of\ that\ node.\ \ We're}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02191}02191\ \textcolor{comment}{//\ going\ to\ use\ this\ ID\ to\ discover\ which\ node\ it\ is\ that\ we're\ actually\ going}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02192}02192\ \textcolor{comment}{//\ to\ update.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02193}02193\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02194}02194\ \ \ Ipv4Address\ routerId\ =\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a51238c1122fc794564a658bf852d6910}{m\_spfroot}}-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a83acd923d19102c507faadb2f4e68f56}{GetVertexId}}\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02195}02195\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02196}02196\ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Vertex\ ID\ =\ "{}}\ <<\ routerId);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02197}02197\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02198}02198\ \textcolor{comment}{//\ We\ need\ to\ walk\ the\ list\ of\ nodes\ looking\ for\ the\ one\ that\ has\ the\ router}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02199}02199\ \textcolor{comment}{//\ ID\ corresponding\ to\ the\ root\ vertex.\ \ This\ is\ the\ one\ we're\ going\ to\ write}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02200}02200\ \textcolor{comment}{//\ the\ routing\ information\ to.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02201}02201\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02202}02202\ \ \ NodeList::Iterator\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ =\ NodeList::Begin\ ();\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02203}02203\ \ \ NodeList::Iterator\ listEnd\ =\ NodeList::End\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02204}02204\ \ \ \textcolor{keywordflow}{for}\ (;\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ !=\ listEnd;\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}++)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02205}02205\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02206}02206\ \ \ \ \ \ \ Ptr<Node>\ node\ =\ *\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02207}02207\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02208}02208\ \textcolor{comment}{//\ The\ router\ ID\ is\ accessible\ through\ the\ DGRRouter\ interface,\ so\ we\ need}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02209}02209\ \textcolor{comment}{//\ to\ GetObject\ for\ that\ interface.\ \ If\ there's\ no\ DGRRouter\ interface,\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02210}02210\ \textcolor{comment}{//\ the\ node\ in\ question\ cannot\ be\ the\ router\ we\ want,\ so\ we\ continue.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02211}02211\ \textcolor{comment}{//\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02212}02212\ \ \ \ \ \ \ Ptr<DGRRouter>\ rtr\ =\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02213}02213\ \ \ \ \ \ \ \ \ node-\/>GetObject<\mbox{\hyperlink{classns3_1_1_d_g_r_router}{DGRRouter}}>\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02214}02214\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02215}02215\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!rtr)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02216}02216\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02217}02217\ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}No\ DGRRouter\ interface\ on\ node\ "{}}\ <<\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02218}02218\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ node-\/>GetId\ ());}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02219}02219\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02220}02220\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02221}02221\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02222}02222\ \textcolor{comment}{//\ If\ the\ router\ ID\ of\ the\ current\ node\ is\ equal\ to\ the\ router\ ID\ of\ the\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02223}02223\ \textcolor{comment}{//\ root\ of\ the\ SPF\ tree,\ then\ this\ node\ is\ the\ one\ for\ which\ we\ need\ to\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02224}02224\ \textcolor{comment}{//\ write\ the\ routing\ tables.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02225}02225\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02226}02226\ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Considering\ router\ "{}}\ <<\ rtr-\/>GetRouterId\ ());}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02227}02227\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02228}02228\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (rtr-\/>GetRouterId\ ()\ ==\ routerId)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02229}02229\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02230}02230\ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}setting\ routes\ for\ node\ "{}}\ <<\ node-\/>GetId\ ());}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02231}02231\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02232}02232\ \textcolor{comment}{//\ Routing\ information\ is\ updated\ using\ the\ Ipv4\ interface.\ \ We\ need\ to\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02233}02233\ \textcolor{comment}{//\ GetObject\ for\ that\ interface.\ \ If\ the\ node\ is\ acting\ as\ an\ IP\ version\ 4\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02234}02234\ \textcolor{comment}{//\ router,\ it\ should\ absolutely\ have\ an\ Ipv4\ interface.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02235}02235\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02236}02236\ \ \ \ \ \ \ \ \ \ \ Ptr<Ipv4>\ ipv4\ =\ node-\/>GetObject<Ipv4>\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02237}02237\ \ \ \ \ \ \ \ \ \ \ NS\_ASSERT\_MSG\ (ipv4,\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02238}02238\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}DGRRouteManagerImpl::SPFIntraAddTransit\ ():\ "{}}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02239}02239\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}GetObject\ for\ <Ipv4>\ interface\ failed"{}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02240}02240\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02241}02241\ \textcolor{comment}{//\ Get\ the\ Global\ Router\ Link\ State\ Advertisement\ from\ the\ vertex\ we're}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02242}02242\ \textcolor{comment}{//\ adding\ the\ routes\ to.\ \ The\ LSA\ will\ have\ a\ number\ of\ attached\ Global\ Router}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02243}02243\ \textcolor{comment}{//\ Link\ Records\ corresponding\ to\ links\ off\ of\ that\ vertex\ /\ node.\ \ We're\ going}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02244}02244\ \textcolor{comment}{//\ to\ be\ interested\ in\ the\ records\ corresponding\ to\ point-\/to-\/point\ links.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02245}02245\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02246}02246\ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a}{DGRRoutingLSA}}\ *lsa\ =\ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a5f9422d4f1f9df2f301cbd578e29ae7b}{GetLSA}}\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02247}02247\ \ \ \ \ \ \ \ \ \ \ NS\_ASSERT\_MSG\ (lsa,\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02248}02248\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}DGRRouteManagerImpl::SPFIntraAddTransit\ ():\ "{}}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02249}02249\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}Expected\ valid\ LSA\ in\ DGRVertex*\ v"{}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02250}02250\ \ \ \ \ \ \ \ \ \ \ Ipv4Mask\ tempmask\ =\ lsa-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a3e3b9552f26b930f47dd069eaf0f3950}{GetNetworkLSANetworkMask}}\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02251}02251\ \ \ \ \ \ \ \ \ \ \ Ipv4Address\ tempip\ =\ lsa-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_routing_l_s_a_a0ec746b926044a548e4f3a09309322ce}{GetLinkStateId}}\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02252}02252\ \ \ \ \ \ \ \ \ \ \ tempip\ =\ tempip.CombineMask\ (tempmask);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02253}02253\ \ \ \ \ \ \ \ \ \ \ Ptr<DGRRouter>\ router\ =\ node-\/>GetObject<\mbox{\hyperlink{classns3_1_1_d_g_r_router}{DGRRouter}}>\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02254}02254\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!router)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02255}02255\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02256}02256\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02257}02257\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02258}02258\ \ \ \ \ \ \ \ \ \ \ Ptr<Ipv4DGRRouting>\ gr\ =\ router-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_router_a87f63cac54a25accafa7c849a9aa0dbc}{GetRoutingProtocol}}\ ();}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02259}02259\ \ \ \ \ \ \ \ \ \ \ NS\_ASSERT\ (gr);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02260}02260\ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ walk\ through\ all\ available\ exit\ directions\ due\ to\ ECMP,}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02261}02261\ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ and\ add\ host\ route\ for\ each\ of\ the\ exit\ direction\ toward}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02262}02262\ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ the\ vertex\ 'v'}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02263}02263\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (uint32\_t\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ =\ 0;\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ <\ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a691c41409919639a4aaea1443fa26ed5}{GetNRootExitDirections}}\ ();\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}++)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02264}02264\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02265}02265\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex_aace20b0a545f431fbc5e3d6a2c149d44}{DGRVertex::NodeExit\_t}}\ exit\ =\ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a9e66f0b2ee7432156046e75672968138}{GetRootExitDirection}}\ (\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}});}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02266}02266\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Ipv4Address\ nextHop\ =\ exit.first;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02267}02267\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ int32\_t\ outIf\ =\ exit.second;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02268}02268\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02269}02269\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (outIf\ >=\ 0)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02270}02270\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02271}02271\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ gr-\/>AddNetworkRouteTo\ (tempip,\ tempmask,\ nextHop,\ outIf);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02272}02272\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}(Route\ "{}}\ <<\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ <<\ \textcolor{stringliteral}{"{})\ Node\ "{}}\ <<\ node-\/>GetId\ ()\ <<}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02273}02273\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\ add\ network\ route\ to\ "{}}\ <<\ tempip\ <<}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02274}02274\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\ using\ next\ hop\ "{}}\ <<\ nextHop\ <<}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02275}02275\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\ via\ interface\ "{}}\ <<\ outIf);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02276}02276\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02277}02277\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02278}02278\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02279}02279\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}(Route\ "{}}\ <<\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ <<\ \textcolor{stringliteral}{"{})\ Node\ "{}}\ <<\ node-\/>GetId\ ()\ <<}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02280}02280\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\ NOT\ able\ to\ add\ network\ route\ to\ "{}}\ <<\ tempip\ <<}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02281}02281\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\ using\ next\ hop\ "{}}\ <<\ nextHop\ <<}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02282}02282\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\ since\ outgoing\ interface\ id\ is\ negative\ "{}}\ <<\ outIf);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02283}02283\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02284}02284\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02285}02285\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02286}02286\ \ \ \ \ \}\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02287}02287\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02288}02288\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02289}02289\ \textcolor{comment}{//\ Derived\ from\ quagga\ ospf\_vertex\_add\_parents\ ()}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02290}02290\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02291}02291\ \textcolor{comment}{//\ This\ is\ a\ somewhat\ oddly\ named\ method\ (blame\ quagga).\ \ Although\ you\ might}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02292}02292\ \textcolor{comment}{//\ expect\ it\ to\ add\ a\ parent\ *to*\ something,\ it\ actually\ adds\ a\ vertex}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02293}02293\ \textcolor{comment}{//\ to\ the\ list\ of\ children\ *in*\ each\ of\ its\ parents.\ }}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02294}02294\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02295}02295\ \textcolor{comment}{//\ Given\ a\ pointer\ to\ a\ vertex,\ it\ links\ back\ to\ the\ vertex's\ parent\ that\ it}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02296}02296\ \textcolor{comment}{//\ already\ has\ set\ and\ adds\ itself\ to\ that\ vertex's\ list\ of\ children.}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02297}02297\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02298}02298\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02299}\mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a98dcc2494c9f368e4cfed15ead8a2990}{02299}}\ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_impl_a98dcc2494c9f368e4cfed15ead8a2990}{DGRRouteManagerImpl::DGRVertexAddParent}}\ (\mbox{\hyperlink{classns3_1_1_d_g_r_vertex}{DGRVertex}}*\ v)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02300}02300\ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02301}02301\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ v);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02302}02302\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02303}02303\ \ \ \textcolor{keywordflow}{for}\ (uint32\_t\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}=0;;)}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02304}02304\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02305}02305\ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_vertex}{DGRVertex}}*\ parent;}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02306}02306\ \ \ \ \ \ \ \textcolor{comment}{//\ check\ if\ all\ parents\ of\ vertex\ v}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02307}02307\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ ((parent\ =\ v-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_a6937ca725aa1a7f5284d1b75a5dfb9f8}{GetParent}}\ (\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}++))\ ==\ 0)\ \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02308}02308\ \ \ \ \ \ \ parent-\/>\mbox{\hyperlink{classns3_1_1_d_g_r_vertex_af0c852bbf364e527e6f7b1c34105a06e}{AddChild}}\ (v);}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02309}02309\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02310}02310\ \}}
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02311}02311\ }
\DoxyCodeLine{\Hypertarget{dgr-route-manager-impl_8cc_source_l02312}02312\ \}\ \textcolor{comment}{//\ namespace\ ns3}}

\end{DoxyCode}
